Skip to content

Commit

Permalink
fix: add missing content margin on accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
abelflopes committed Jan 26, 2024
1 parent 804261e commit 8ee568c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
},
"dependencies": {
"@react-ck/collapse": "^1.1.7",
"@react-ck/list": "^1.2.1"
"@react-ck/list": "^1.2.1",
"@react-ck/theme": "^1.5.1"
},
"peerDependencies": {
"react": "^18.2.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/components/accordion/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { List, type ListProps } from "@react-ck/list";
import { Collapse } from "@react-ck/collapse";
import styles from "./styles/index.module.scss";

export interface AccordionItem {
header: NonNullable<React.ReactNode>;
Expand All @@ -25,7 +26,7 @@ export const Accordion = ({
{...otherProps}
items={items.map(({ header, children }) => (
<Collapse key={String(JSON.stringify(header))} header={header}>
{children}
<div className={styles.content}>{children}</div>
</Collapse>
))}
/>
Expand Down
5 changes: 5 additions & 0 deletions packages/components/accordion/src/styles/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "@react-ck/theme";

.content {
margin-top: get-spacing(1);
}

0 comments on commit 8ee568c

Please sign in to comment.