diff --git a/packages/web-react/src/components/Box/Box.tsx b/packages/web-react/src/components/Box/Box.tsx index 54a1b75fd1..73d844b419 100644 --- a/packages/web-react/src/components/Box/Box.tsx +++ b/packages/web-react/src/components/Box/Box.tsx @@ -14,18 +14,11 @@ const Box = (props: SpiritBoxProps) => { const propsWithDefaults = { ...defaultProps, ...props }; const { elementType: ElementTag = 'div', children, ...restProps } = propsWithDefaults; - const { classProps, props: modifiedProps, styleProps: boxStyle } = useBoxStyleProps(restProps); + const { classProps, props: modifiedProps } = useBoxStyleProps(restProps); const { styleProps, props: otherProps } = useStyleProps(modifiedProps); - const boxStyleProps = { - style: { - ...styleProps.style, - ...boxStyle, - }, - }; - return ( - + {children} ); diff --git a/packages/web-react/src/components/Box/useBoxStyleProps.ts b/packages/web-react/src/components/Box/useBoxStyleProps.ts index 9f142a78d9..6400004750 100644 --- a/packages/web-react/src/components/Box/useBoxStyleProps.ts +++ b/packages/web-react/src/components/Box/useBoxStyleProps.ts @@ -12,8 +12,6 @@ export interface UseBoxStyleProps { classProps: string; /** Props for the box element. */ props: T; - /** Style props for the box element */ - styleProps: BoxCSSProperties; } export const generateResponsiveUtilityClasses = ( @@ -52,8 +50,6 @@ export const useBoxStyleProps = ( paddingY, ...restProps } = props || {}; - const boxStyle: BoxCSSProperties = {}; - const boxBackgroundColor = backgroundColor ? `bg-${backgroundColor}` : ''; let boxBorderColor = borderColor ? borderColor.replace('', 'border-') : ''; let boxBorderRadius = ''; @@ -90,6 +86,5 @@ export const useBoxStyleProps = ( return { classProps: boxClasses, props: restProps, - styleProps: boxStyle, }; };