Skip to content

Commit

Permalink
Introduce primaryCellSizes and SVGCellSizes to the NotificationWithSV…
Browse files Browse the repository at this point in the history
…G component.
  • Loading branch information
zutigrm committed Jan 14, 2025
1 parent 05f0f04 commit f62210c
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,23 @@ export default function NotificationWithSVG( {
description,
actions,
SVG,
primaryCellSizes,
SVGCellSizes,
} ) {
const breakpoint = useBreakpoint();

// Desktop breakpoint.
let svgSizeProps = { mdSize: 8, lgSize: 6 };
let svgSizeProps = {
mdSize: SVGCellSizes?.md || 8,
lgSize: SVGCellSizes?.lg || 6,
};
// Tablet breakpoint.
if ( breakpoint === BREAKPOINT_TABLET ) {
svgSizeProps = { mdSize: 8 };
svgSizeProps = { mdSize: SVGCellSizes?.md || 8 };
}
// Mobile breakpoint.
if ( breakpoint === BREAKPOINT_SMALL ) {
svgSizeProps = { smSize: 12 };
svgSizeProps = { smSize: SVGCellSizes?.sm || 12 };
}

return (
Expand All @@ -67,9 +72,11 @@ export default function NotificationWithSVG( {
<Grid collapsed>
<Row>
<Cell
smSize={ 12 }
mdSize={ 8 }
lgSize={ 6 }
smSize={
primaryCellSizes?.sm || 12
}
mdSize={ primaryCellSizes?.md || 8 }
lgSize={ primaryCellSizes?.lg || 6 }
className="googlesitekit-setup-cta-banner__primary-cell"
>
<h3 className="googlesitekit-setup-cta-banner__title">
Expand Down

0 comments on commit f62210c

Please sign in to comment.