Remove unused restProps spread from Flex and Grid components
Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ import { FlexDefinition } from './definition';
|
||||
|
||||
/** @public */
|
||||
export const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {
|
||||
const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
FlexDefinition,
|
||||
{ gap: '4', ...props },
|
||||
);
|
||||
@@ -33,7 +33,6 @@ export const Flex = forwardRef<HTMLDivElement, FlexProps>((props, ref) => {
|
||||
className={classes.root}
|
||||
style={{ ...utilityStyle, ...ownProps.style }}
|
||||
{...dataAttributes}
|
||||
{...restProps}
|
||||
>
|
||||
{childrenWithBgProvider}
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@ import { useDefinition } from '../../hooks/useDefinition';
|
||||
import { GridDefinition, GridItemDefinition } from './definition';
|
||||
|
||||
const GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {
|
||||
const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
GridDefinition,
|
||||
{ columns: 'auto', gap: '4', ...props },
|
||||
);
|
||||
@@ -32,7 +32,6 @@ const GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {
|
||||
className={classes.root}
|
||||
style={{ ...utilityStyle, ...ownProps.style }}
|
||||
{...dataAttributes}
|
||||
{...restProps}
|
||||
>
|
||||
{childrenWithBgProvider}
|
||||
</div>
|
||||
@@ -40,7 +39,7 @@ const GridRoot = forwardRef<HTMLDivElement, GridProps>((props, ref) => {
|
||||
});
|
||||
|
||||
const GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {
|
||||
const { ownProps, restProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
const { ownProps, dataAttributes, utilityStyle } = useDefinition(
|
||||
GridItemDefinition,
|
||||
props,
|
||||
);
|
||||
@@ -52,7 +51,6 @@ const GridItem = forwardRef<HTMLDivElement, GridItemProps>((props, ref) => {
|
||||
className={classes.root}
|
||||
style={{ ...utilityStyle, ...ownProps.style }}
|
||||
{...dataAttributes}
|
||||
{...restProps}
|
||||
>
|
||||
{childrenWithBgProvider}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user