Skip to content

Commit

Permalink
Update documentation for [Accordion] (#84)
Browse files Browse the repository at this point in the history
Interface type is unnecessary code in docs
I got a confirmation from below conversation
https://github.com/dooboolab/dooboo-ui/pull/69/files/7bc93125c25e190aa8f9b2066d666e4565ac0512#r697234481

related PR #69

* Update legacy props in usage example for [Accordion] component
   - isAnimated -> shouldAnimate
  • Loading branch information
luke-hanwook committed Aug 28, 2021
1 parent 6c61c9c commit 67dd57e
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions docs/src/components/Accordion/Accordion.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,20 @@ import Default from './index';

> Simple drop down item component for react-native. This component supports drop down toggle with animation.<br/>
interface Props {
style?: ViewStyle;
styles?: Styles;
data: Datum[];
shouldAnimate: boolean;
collapseOnStart: boolean;
animDuration?: number;
activeOpacity?: number;
toggleElement?: React.ReactElement;
renderTitle?: (item: string) => React.ReactElement;
renderBody?: (item: string) => React.ReactElement;
}

## Props

| | necessary | types | default |
| ------------------ | --------- | -----------------------| ---------------------------------------------|
| style | | ViewStyle | `undefined` |
| styles | | Styles | `undefined` |
| data || array | |
| shouldAnimate | | boolean | `true` |
| collapseOnStart | | boolean | `true ` |
| animDuration | | number | `300` |
| activeOpacity | | number | `1` |
| toggleElement | | React.ReactElement | `default arrow image` |
| renderTitle | | (string) => JSX.Element| `default wrapper` |
| renderBody | | (string) => JSX.Element| `default wrapper` |

| | necessary | types | default |
| --------------- | --------- | ----------------------- | --------------------- |
| style | | ViewStyle | `undefined` |
| styles | | Styles | `undefined` |
| data || array | |
| shouldAnimate | | boolean | `true` |
| collapseOnStart | | boolean | `true ` |
| animDuration | | number | `300` |
| activeOpacity | | number | `1` |
| toggleElement | | React.ReactElement | `default arrow image` |
| renderTitle | | (string) => JSX.Element | `default wrapper` |
| renderBody | | (string) => JSX.Element | `default wrapper` |

## Installation

Expand Down Expand Up @@ -94,7 +80,7 @@ const Default = (): React.ReactElement => {
<Container>
<Accordion
data={data}
isAnimated={true}
shouldAnimate={true}
collapseOnStart={true}
animDuration={400}
activeOpacity={1}
Expand Down

0 comments on commit 67dd57e

Please sign in to comment.