Skip to content

Commit

Permalink
💄 style: Fix Collapse style
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 21, 2024
1 parent b24a38a commit e75cf1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Collapse/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ export interface CollapseProps extends AntdCollapseProps {

const Collapse = memo<CollapseProps>(
({ style, variant = 'default', gap = 0, className, padding, ...rest }) => {
const bodyPadding = typeof padding === 'object' ? padding.body : padding;
const headerPadding = typeof padding === 'object' ? padding.header : padding;

const { cx, styles } = useStyles({
bodyPadding: (typeof padding === 'object' ? padding.body : padding) || '12px 16px',
headerPadding: (typeof padding === 'object' ? padding.header : padding) || '12px 16px',
bodyPadding: bodyPadding === undefined ? '12px 16px' : bodyPadding,
headerPadding: headerPadding === undefined ? '12px 16px' : headerPadding,
isSplit: !!gap,
});

Expand Down

0 comments on commit e75cf1a

Please sign in to comment.