Skip to content

Commit

Permalink
fix: use provided data-css in route wrapper if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Jul 10, 2024
1 parent 309cce1 commit f74973a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/frontend/components/routes/utils/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ type WrapperProps = BoxProps & {

const Wrapper: React.FC<WrapperProps> = (props) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { children, variant, color, showFilter = false, ...rest } = props
const { children, variant, color, showFilter = false, 'data-css': dataCss, ...rest } = props

const Component: ComponentType<PropsWithChildren<any>> = showFilter
? StyledWrapperWithFilter
: StyledWrapper

return (
<Component {...rest} variant="transparent" mx="auto" data-css="styled-wrapper">
<Component {...rest} variant="transparent" mx="auto" data-css={dataCss || 'styled-wrapper'}>
{children}
</Component>
)
Expand Down

0 comments on commit f74973a

Please sign in to comment.