Skip to content

Commit

Permalink
💄 style: Update GridShowcaseProps
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Apr 30, 2024
1 parent 0e96cd5 commit e9890dc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/GridBackground/GridShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
import { useTheme } from 'antd-style';
import { rgba } from 'polished';
import { memo } from 'react';
import { Flexbox } from 'react-layout-kit';

import { DivProps } from '@/types';
import { Flexbox, FlexboxProps } from 'react-layout-kit';

import GridBackground, { type GridBackgroundProps } from './index';

export interface GridShowcaseProps extends DivProps {
export interface GridShowcaseProps extends FlexboxProps {
backgroundColor?: GridBackgroundProps['backgroundColor'];
innerProps?: FlexboxProps;
}

const GridShowcase = memo<GridShowcaseProps>(
({ style, children, backgroundColor = '#001dff', ...rest }) => {
({ style, children, backgroundColor = '#001dff', innerProps, ...rest }) => {
const theme = useTheme();

return (
<div style={{ position: 'relative', ...style }} {...rest}>
<Flexbox style={{ position: 'relative', ...style }} {...rest}>
<GridBackground
animation
colorBack={rgba(theme.colorText, 0.12)}
colorFront={rgba(theme.colorText, 0.6)}
flip
/>
<Flexbox align={'center'} style={{ zIndex: 4 }}>
<Flexbox align={'center'} {...innerProps} style={{ zIndex: 4, ...innerProps?.style }}>
{children}
</Flexbox>
<GridBackground
Expand All @@ -38,7 +37,7 @@ const GridShowcase = memo<GridShowcaseProps>(
showBackground
style={{ zIndex: 0 }}
/>
</div>
</Flexbox>
);
},
);
Expand Down

0 comments on commit e9890dc

Please sign in to comment.