Skip to content

Commit

Permalink
Fix(web-react): Collapse content element props
Browse files Browse the repository at this point in the history
  • Loading branch information
tomassychra committed Jan 12, 2023
1 parent 03b0e0d commit 6440ef3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/web-react/src/components/Collapse/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const Collapse = (props: SpiritCollapseProps) => {
className={classNames(classProps.root, styleProps.className, transitioningStyles[transitionState])}
ref={rootElementRef}
>
<div ref={collapseElementRef} className={classProps.content}>
<ElementTag ref={collapseElementRef} className={classProps.content}>
{children}
</div>
</ElementTag>
</ElementTag>
)}
</Transition>
Expand Down
17 changes: 9 additions & 8 deletions packages/web-react/src/components/Collapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ const [isOpen, toggle] = useState<boolean>(true);

## Props

| Prop name | Type | Default | Required | Description |
| ------------------------- | ------------------------------- | ---------- | -------- | ---------------------------------- |
| `id` | `string` | `<random>` | no | Component id |
| `isOpen` | `boolean` | - | no | Is open on initialization |
| `collapsibleToBreakpoint` | `'mobile', 'tablet', 'desktop'` | - | no | Handle for responsive breakpoint |
| `transitionDuration` | `number` | `250` | no | Transition duration in miliseconds |
| `UNSAFE_className` | `string` | - | no | Wrapper custom class name |
| `UNSAFE_style` | `CSSProperties` | - | no | Wrapper custom style |
| Prop name | Type | Default | Required | Description |
| ------------------------- | ------------------------------- | ---------- | -------- | ------------------------------------------- |
| `id` | `string` | `<random>` | no | Component id |
| `isOpen` | `boolean` | - | no | Is open on initialization |
| `collapsibleToBreakpoint` | `'mobile', 'tablet', 'desktop'` | - | no | Handle for responsive breakpoint |
| `transitionDuration` | `number` | `250` | no | Transition duration in miliseconds |
| `elementType` | `'span', 'div'` | `'div'` | no | Type of element used as wrapper and content |
| `UNSAFE_className` | `string` | - | no | Wrapper custom class name |
| `UNSAFE_style` | `CSSProperties` | - | no | Wrapper custom style |

## Uncontrolled Collapse

Expand Down

0 comments on commit 6440ef3

Please sign in to comment.