From fe408555345d9e7fc1e848c6809dd49b62020d6d Mon Sep 17 00:00:00 2001 From: AlejoYarce Date: Sun, 5 Jan 2025 21:22:43 -0500 Subject: [PATCH] Standardize Documentation --- README.md | 4 +- src/components/Banner/README.md | 129 ------------------ src/components/Buttons/Button/README.md | 49 ++----- src/components/Checkbox/README.md | 45 ++---- .../InlineMessage.stories.tsx} | 8 +- .../InlineMessageDemo.tsx} | 46 +++---- src/components/InlineMessage/README.md | 129 ++++++++++++++++++ .../{Banner => InlineMessage}/index.tsx | 46 +++---- .../{Banner => InlineMessage}/styled.ts | 18 +-- .../{Banner => InlineMessage}/types.ts | 2 +- src/components/Input/README.md | 99 -------------- .../Layer/LayerGroup/LayerGroup.stories.tsx | 2 +- .../Layer/LayerItem/LayerItem.stories.tsx | 2 +- .../Layer/LayerPanel/LayerPanel.stories.tsx | 2 +- .../LayerSidebar/LayerSidebar.stories.tsx | 2 +- .../Legend/LayerParameters/README.md | 2 +- .../Legend/LegendItem/LegendItem.stories.tsx | 4 +- .../Legend/LegendItem/LegendItemDemo.tsx | 8 +- src/components/Legend/LegendItem/README.md | 4 +- .../Legend/LegendPanel/LegendItem.stories.tsx | 6 +- .../Legend/LegendPanel/LegendPanelDemo.tsx | 10 +- src/components/Legend/LegendPanel/README.md | 4 +- src/components/Legend/LegendPanel/index.tsx | 18 ++- src/components/Legend/LegendPanel/styled.ts | 5 +- .../Legend/OpacityControl/index.tsx | 12 +- .../Legend/OpacityControl/styled.ts | 4 +- .../QualitativeLegend.stories.tsx | 2 +- .../Legend/QualitativeLegend/README.md | 48 ++++--- src/components/Radio/README.md | 57 ++------ src/components/Radio/Radio.stories.tsx | 2 +- src/components/Slider/README.md | 38 ++---- src/components/Switch/README.md | 16 +-- src/components/TabBar/TabBar.stories.tsx | 2 +- src/components/Tag/README.md | 37 +---- src/components/TextInput/README.md | 90 ++++++++++++ .../TextInput.stories.tsx} | 8 +- .../TextInputDemo.tsx} | 14 +- src/components/{Input => TextInput}/index.tsx | 18 +-- src/components/{Input => TextInput}/styled.ts | 4 +- src/components/{Input => TextInput}/types.ts | 2 +- src/components/Textarea/README.md | 61 ++++----- src/components/icons/Analysis.tsx | 13 +- src/components/icons/Legend.tsx | 24 +++- src/components/index.ts | 4 +- 44 files changed, 497 insertions(+), 603 deletions(-) delete mode 100644 src/components/Banner/README.md rename src/components/{Banner/Banner.stories.tsx => InlineMessage/InlineMessage.stories.tsx} (93%) rename src/components/{Banner/BannerDemo.tsx => InlineMessage/InlineMessageDemo.tsx} (90%) create mode 100644 src/components/InlineMessage/README.md rename src/components/{Banner => InlineMessage}/index.tsx (54%) rename src/components/{Banner => InlineMessage}/styled.ts (79%) rename src/components/{Banner => InlineMessage}/types.ts (87%) delete mode 100644 src/components/Input/README.md create mode 100644 src/components/TextInput/README.md rename src/components/{Input/Input.stories.tsx => TextInput/TextInput.stories.tsx} (91%) rename src/components/{Input/InputDemo.tsx => TextInput/TextInputDemo.tsx} (76%) rename src/components/{Input => TextInput}/index.tsx (86%) rename src/components/{Input => TextInput}/styled.ts (94%) rename src/components/{Input => TextInput}/types.ts (91%) diff --git a/README.md b/README.md index f838148..0f0b672 100644 --- a/README.md +++ b/README.md @@ -91,11 +91,11 @@ function App() { ### General -- [Banner](https://github.com/wri/wri-design-systems/tree/main/src/components/Banner) - [NavigationRail](https://github.com/wri/wri-design-systems/tree/main/src/components/NavigationRail) - [Slider](https://github.com/wri/wri-design-systems/tree/main/src/components/Slider) - [TabBar](https://github.com/wri/wri-design-systems/tree/main/src/components/TabBar) - [Tag](https://github.com/wri/wri-design-systems/tree/main/src/components/Tag) +- [InlineMessage](https://github.com/wri/wri-design-systems/tree/main/src/components/InlineMessage) ### Buttons @@ -111,7 +111,7 @@ function App() { ### Inputs -- [Input](https://github.com/wri/wri-design-systems/tree/main/src/components/Input) +- [TextInput](https://github.com/wri/wri-design-systems/tree/main/src/components/TextInput) - [Textarea](https://github.com/wri/wri-design-systems/tree/main/src/components/Textarea) ### Layers diff --git a/src/components/Banner/README.md b/src/components/Banner/README.md deleted file mode 100644 index 9f949d8..0000000 --- a/src/components/Banner/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# Banner - -[Storybook Ref](https://wri.github.io/wri-design-systems/?path=/docs/banner--docs) - -[BannerDemo](https://github.com/wri/wri-design-systems/blob/main/src/components/Banner/BannerDemo.tsx) - -## Import - -```js -import { Banner } from 'wri-design-systems' -``` - -## Usage - -```html - -``` - -## Props - -```ts -type BannerProps = { - label: string - caption?: string - variant: 'info-white' | 'info-grey' | 'success' | 'warning' | 'error' - size?: 'small' | 'large' - icon?: React.ReactNode - onActionClick?: VoidFunction - actionLabel?: string - isButtonRight?: boolean -} -``` - -## Info White - -```html - -``` - -## Info Grey - -```html - -``` - -## Success - -```html - -``` - -## Warning - -```html - -``` - -## Error - -```html - -``` - -## Button Right - -```html - -``` - -## Small - -```html - -``` - -## Small Button Right - -```html - -``` diff --git a/src/components/Buttons/Button/README.md b/src/components/Buttons/Button/README.md index a03801d..8789ae7 100644 --- a/src/components/Buttons/Button/README.md +++ b/src/components/Buttons/Button/README.md @@ -13,10 +13,7 @@ import { Button } from 'wri-design-systems' ## Usage ```html -