Skip to content

Commit

Permalink
feat(components): Add new prop to handle show icon or not (noIcon pro…
Browse files Browse the repository at this point in the history
…p: boolean) on TotalLayoutHeader.
  • Loading branch information
fermarinsanchez committed Oct 23, 2024
1 parent e1c35a2 commit 2aa31e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const TOTAL_LAYOUT_HEADER_PROP_TYPES = {
cancelable: PropTypes.bool,
direction: PropTypes.oneOf(['row', 'column']),
rightZone: PropTypes.node,
noIcon: PropTypes.bool,
};

export const TOTAL_LAYOUT_HEADER_DEFAULT_PROPS = {
Expand All @@ -24,6 +25,7 @@ export const TOTAL_LAYOUT_HEADER_DEFAULT_PROPS = {
cancelable: true,
direction: 'column',
rightZone: null,
noIcon: false,
};

export const TOTAL_LAYOUT_HEADER_HEIGHT = 72;
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const TotalLayoutHeader = ({
cancelable = true,
mainActionLabel = 'Cancelar',
rightZone = null,
noIcon = false,
...props
}) => {
const formContext = useFormContext();
Expand All @@ -50,7 +51,7 @@ const TotalLayoutHeader = ({
{/* ICON & LABELS */}
<Stack alignItems="center">
<Stack>
<Box className={classes.iconContainer}>{icon}</Box>
{!noIcon && <Box className={classes.iconContainer}>{icon}</Box>}
<Stack
spacing={compact ? 2 : 0}
justifyContent="center"
Expand Down

0 comments on commit 2aa31e4

Please sign in to comment.