Skip to content

Commit fdfd617

Browse files
authored
fix: [M3-10446] - Fix console error from hasBorder prop in styled component (linode#12657)
* fix console error from hasBorder * Added changeset: Console error from `hasBorder` prop in `StyledFlag` component
1 parent 3492631 commit fdfd617

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Console error from `hasBorder` prop in `StyledFlag` component ([#12657](https://github.com/linode/manager/pull/12657))

packages/manager/src/components/Flag.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box } from '@linode/ui';
1+
import { Box, omittedProps } from '@linode/ui';
22
import 'flag-icons/css/flag-icons.min.css';
33
import { styled } from '@mui/material/styles';
44
import React from 'react';
@@ -45,7 +45,10 @@ const getFlagClass = (country: Country | string) => {
4545
return country;
4646
};
4747

48-
const StyledFlag = styled(Box, { label: 'StyledFlag' })<{
48+
const StyledFlag = styled(Box, {
49+
shouldForwardProp: omittedProps(['hasBorder']),
50+
label: 'StyledFlag',
51+
})<{
4952
hasBorder: boolean;
5053
}>(({ theme, hasBorder }) => ({
5154
boxShadow:

0 commit comments

Comments
 (0)