Fix warnings
Refs: https://stackoverflow.com/questions/69730364/what-is-the-purpose-of-shouldforwardprop-option-in-styled
This commit is contained in:
parent
d30a8b8033
commit
0a93ba67a1
3 changed files with 17 additions and 11 deletions
|
@ -111,14 +111,13 @@ function getShrinkRatio(width: number, columns: number) {
|
|||
);
|
||||
}
|
||||
|
||||
const ListContainer = styled(Box)<{
|
||||
columns: number;
|
||||
shrinkRatio: number;
|
||||
groups?: number[];
|
||||
const ListContainer = styled(Box, {
|
||||
shouldForwardProp: (propName) => propName != "gridTemplateColumns",
|
||||
})<{
|
||||
gridTemplateColumns: string;
|
||||
}>`
|
||||
display: grid;
|
||||
grid-template-columns: ${({ columns, shrinkRatio, groups }) =>
|
||||
getTemplateColumns(columns, shrinkRatio, groups)};
|
||||
grid-template-columns: ${(props) => props.gridTemplateColumns};
|
||||
grid-column-gap: ${GAP_BTW_TILES}px;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
|
@ -235,9 +234,11 @@ const PhotoListRow = React.memo(
|
|||
return (
|
||||
<ListItem style={style}>
|
||||
<ListContainer
|
||||
columns={columns}
|
||||
shrinkRatio={shrinkRatio}
|
||||
groups={timeStampList[index].groups}
|
||||
gridTemplateColumns={getTemplateColumns(
|
||||
columns,
|
||||
shrinkRatio,
|
||||
timeStampList[index].groups,
|
||||
)}
|
||||
>
|
||||
{renderListItem(timeStampList[index], isScrolling)}
|
||||
</ListContainer>
|
||||
|
|
|
@ -23,7 +23,9 @@ export const SearchMobileBox = styled(FluidContainer)`
|
|||
}
|
||||
`;
|
||||
|
||||
export const SearchInputWrapper = styled(CenteredFlex)<{ isOpen: boolean }>`
|
||||
export const SearchInputWrapper = styled(CenteredFlex, {
|
||||
shouldForwardProp: (propName) => propName != "isOpen",
|
||||
})<{ isOpen: boolean }>`
|
||||
background: ${({ theme }) => theme.colors.background.base};
|
||||
max-width: 484px;
|
||||
margin: auto;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { styled } from "@mui/material";
|
||||
import { FlexWrapper } from "../../components/Container";
|
||||
const NavbarBase = styled(FlexWrapper)<{ isMobile: boolean }>`
|
||||
|
||||
const NavbarBase = styled(FlexWrapper, {
|
||||
shouldForwardProp: (propName) => propName != "isMobile",
|
||||
})<{ isMobile: boolean }>`
|
||||
min-height: 64px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue