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:
@ -39,6 +39,7 @@ export const DropdownMenuContainer = ({
|
||||
});
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
<StyledDropdownMenuContainer data-select-disable {...props} anchor={anchor}>
|
||||
<StyledDropdownMenu ref={dropdownRef} width={width}>
|
||||
{children}
|
||||
|
||||
@ -55,6 +55,7 @@ export const DropdownMenuHeader = ({
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
<StyledHeader {...props}>
|
||||
{StartIcon && (
|
||||
<StyledStartIconWrapper>
|
||||
|
||||
@ -38,6 +38,7 @@ export const DropdownMenuSearchInput = forwardRef<
|
||||
InputHTMLAttributes<HTMLInputElement>
|
||||
>((props, ref) => (
|
||||
<StyledDropdownMenuSearchInputContainer>
|
||||
{/* eslint-disable-next-line twenty/no-spread-props */}
|
||||
<StyledInput autoComplete="off" placeholder="Search" {...props} ref={ref} />
|
||||
</StyledDropdownMenuSearchInputContainer>
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user