Update the frontend to adhere to the custom eslint rule twenty/no-spread-props (#1958)

* Update the frontend to adhere to the custom eslint rule `twenty/no-spread-props`

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Update the frontend to adhere to the custom eslint rule `twenty/no-spread-props`

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* resolve bug with data-testid

---------

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
gitstart-twenty
2023-10-10 16:40:49 +03:00
committed by GitHub
parent 5dddd77eb3
commit bf397bc6ec
33 changed files with 276 additions and 169 deletions

View File

@ -8,11 +8,10 @@ const StyledContent = styled(UIModal.Content)`
width: calc(400px - ${({ theme }) => theme.spacing(10 * 2)});
`;
type AuthModalProps = React.ComponentProps<'div'>;
type AuthModalProps = { children: React.ReactNode };
export const AuthModal = ({ children, ...restProps }: AuthModalProps) => (
// eslint-disable-next-line twenty/no-spread-props
<UIModal isOpen={true} {...restProps}>
export const AuthModal = ({ children }: AuthModalProps) => (
<UIModal isOpen={true}>
<StyledContent>{children}</StyledContent>
</UIModal>
);