Skip to content

Commit

Permalink
fix(TotalLayoutHeader): add prop for it to accept the main action but…
Browse files Browse the repository at this point in the history
…ton label
  • Loading branch information
paola-p committed Dec 19, 2023
1 parent 11c3742 commit c0ea199
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const TotalLayoutHeader = ({
compact = false,
direction = 'column',
cancelable = true,
mainActionLabel = 'Cancelar',
...props
}) => {
const formContext = useFormContext();
const formValues = isFunction(formContext?.watch) ? formContext.watch() : {};
Expand Down Expand Up @@ -61,7 +63,7 @@ const TotalLayoutHeader = ({
{!!children && direction === 'row' && children}
{cancelable && (
<Button variant="link" type="button" leftIcon={<CrossIcon />} onClick={onCancel}>
Cancelar
{mainActionLabel}
</Button>
)}
</Stack>
Expand Down

0 comments on commit c0ea199

Please sign in to comment.