Add styled component rule (#1261)

* Add StyledComponent rule

* update doc

* update doc

* update doc
This commit is contained in:
Weiko
2023-08-17 20:58:02 -07:00
committed by GitHub
parent 390e70a196
commit 9b34a0ff3d
70 changed files with 433 additions and 354 deletions

View File

@ -7,7 +7,7 @@ import {
useListenClickOutside,
} from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
const ModalDiv = styled(motion.div)`
const StyledModalDiv = styled(motion.div)`
display: flex;
flex-direction: column;
background: ${({ theme }) => theme.background.primary};
@ -43,7 +43,7 @@ const StyledFooter = styled.div`
padding: ${({ theme }) => theme.spacing(5)};
`;
const BackDrop = styled(motion.div)`
const StyledBackDrop = styled(motion.div)`
align-items: center;
background: ${({ theme }) => theme.background.overlay};
display: flex;
@ -111,8 +111,8 @@ export function Modal({
}
return (
<BackDrop>
<ModalDiv
<StyledBackDrop>
<StyledModalDiv
// framer-motion seems to have typing problems with refs
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
@ -125,8 +125,8 @@ export function Modal({
{...restProps}
>
{children}
</ModalDiv>
</BackDrop>
</StyledModalDiv>
</StyledBackDrop>
);
}