Skip to content

Commit

Permalink
fix(UI): refactor responsive grid layout #closes2114
Browse files Browse the repository at this point in the history
  • Loading branch information
kaminderpal committed May 16, 2024
1 parent fdcf58d commit 69203ae
Showing 1 changed file with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ const getLeftPanelSize = (fullWidth: boolean, isRightPanelVisible: boolean, isEn
*/
const ResponsiveGridLeftPanel = forwardRef(
(
{ children, className, isRightPanelVisible = false, sxProps = {}, isEnlarged, fullWidth = false, ...rest }: ResponsiveGridPanelProps,
{
children,
className = '',
isRightPanelVisible = false,
sxProps = {},
isEnlarged,
fullWidth = false,
...rest
}: ResponsiveGridPanelProps,
ref
) => {
const theme = useTheme();
Expand Down Expand Up @@ -111,7 +119,15 @@ const getRightPanelSize = (fullWidth: boolean, isRightPanelVisible: boolean, isE
*/
const ResponsiveGridRightPanel = forwardRef(
(
{ children, className, isRightPanelVisible = false, sxProps = {}, isEnlarged, fullWidth = false, ...rest }: ResponsiveGridPanelProps,
{
children,
className = '',
isRightPanelVisible = false,
sxProps = {},
isEnlarged,
fullWidth = false,
...rest
}: ResponsiveGridPanelProps,
ref
) => {
const theme = useTheme();
Expand Down Expand Up @@ -143,17 +159,3 @@ export const ResponsiveGrid = {
Left: ResponsiveGridLeftPanel,
Right: ResponsiveGridRightPanel,
};

// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ResponsiveGridLeftPanel.defaultProps = {
sxProps: undefined,
fullWidth: false,
className: '',
};

// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ResponsiveGridRightPanel.defaultProps = {
sxProps: undefined,
fullWidth: false,
className: '',
};

0 comments on commit 69203ae

Please sign in to comment.