Remove the {...props} pattern and props coupling, and create an eslint rule for that (#1733)
* Remove the {...props} pattern and props coupling, and create an eslint rule for that
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
* Add another test to the new rule
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
---------
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
@ -137,6 +137,7 @@ export const Dialog = ({
|
||||
<StyledDialogContainer
|
||||
variants={containerVariants}
|
||||
transition={{ damping: 15, stiffness: 100 }}
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
{...rootProps}
|
||||
>
|
||||
{title && <StyledDialogTitle>{title}</StyledDialogTitle>}
|
||||
@ -151,6 +152,7 @@ export const Dialog = ({
|
||||
}}
|
||||
fullWidth={true}
|
||||
variant={button.variant ?? 'secondary'}
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
{...button}
|
||||
/>
|
||||
))}
|
||||
|
||||
@ -40,6 +40,7 @@ export const DialogProvider = ({ children }: React.PropsWithChildren) => {
|
||||
{dialogInternal.queue.map((dialog) => (
|
||||
<Dialog
|
||||
key={dialog.id}
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
{...dialog}
|
||||
onClose={() => handleDialogClose(dialog.id)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user