Skip to content

Commit

Permalink
remove gap
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jul 10, 2024
1 parent 087d34a commit 0f75651
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ import { AnimatedDiv } from './AnimatedDiv'

const paddingTransition = '0.2s ease'

const horizontalCard = styled(Card)(({ theme }) => ({
const horizontalCard = styled(Card)(() => ({
display: 'flex',
gap: theme.spacing.medium,
}))

function AccordionTriggerUnstyled({
Expand Down Expand Up @@ -218,8 +217,6 @@ export default function Accordion({
id,
...props
}: AccordionProps) {
const theme = useTheme()

const { triggerProps, contentProps, isOpen } = useDisclosure({
defaultOpen,
isOpen: isOpenProp,
Expand All @@ -243,19 +240,15 @@ export default function Accordion({
? function Div(props: ComponentProps<'div'>) {
return (
<div
style={
horizontal
? { display: 'flex', gap: theme.spacing.medium }
: {}
}
style={horizontal ? { display: 'flex' } : {}}
{...props}
/>
)
}
: horizontal
? horizontalCard
: Card,
[horizontal, theme.spacing.medium, unstyled]
[horizontal, unstyled]
)
const finalTriggerProps = { isOpen, ...triggerProps }

Expand Down

0 comments on commit 0f75651

Please sign in to comment.