From e67c51f6ad4aec1d55edb21b57f9dba48496e770 Mon Sep 17 00:00:00 2001 From: pereag Date: Mon, 26 Feb 2024 15:11:47 +0100 Subject: [PATCH 1/4] feat: starting adding itemList doc --- docs/components/01-item-list.mdx | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/components/01-item-list.mdx diff --git a/docs/components/01-item-list.mdx b/docs/components/01-item-list.mdx new file mode 100644 index 0000000..3eebf33 --- /dev/null +++ b/docs/components/01-item-list.mdx @@ -0,0 +1,37 @@ +import { GitHubLogo } from '../../src/icons/GitHubLogo'; + +# Item list + +, + }, + ]} + importExample="import { ItemList } from '@smile/react-front-kit';" + packageInfo={{ + label: '@smile/react-front-kit', + link: 'https://www.npmjs.com/package/@smile/react-front-kit', + }} + sourceInfo={{ + link: 'https://github.com/Smile-SA/react-front-kit/blob/main/packages/react-front-kit/src/Components/ItemList/ItemList.tsx', + }} +> + Display a list of simple items with a title, a color, a details section, and a + description. + + +## Storybook Docs + + + +## Props + +ItemList takes a `` generic type that extends `Record`, to be used by [ActionRowOverflow](./action-row-overflow). + +| Name | Type | Default | Description | +| ----------------- | --------- | ------- | ------------------------------------------------------------------------------ | +| items | `IItem[]` | | An array of elements of type IItem that allows you to populate the list items. | +| ... | - | - | extends [`ICardListProps`](./card-list#props) | From 8ac755e0241818dc62ff2837cfe3109aab42a50f Mon Sep 17 00:00:00 2001 From: pereag Date: Mon, 26 Feb 2024 16:48:21 +0100 Subject: [PATCH 2/4] feat: add itemList --- docs/components/01-item-list.mdx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/components/01-item-list.mdx b/docs/components/01-item-list.mdx index 3eebf33..5a07d22 100644 --- a/docs/components/01-item-list.mdx +++ b/docs/components/01-item-list.mdx @@ -5,8 +5,8 @@ import { GitHubLogo } from '../../src/icons/GitHubLogo'; , }, ]} @@ -29,9 +29,16 @@ import { GitHubLogo } from '../../src/icons/GitHubLogo'; ## Props -ItemList takes a `` generic type that extends `Record`, to be used by [ActionRowOverflow](./action-row-overflow). - | Name | Type | Default | Description | | ----------------- | --------- | ------- | ------------------------------------------------------------------------------ | -| items | `IItem[]` | | An array of elements of type IItem that allows you to populate the list items. | -| ... | - | - | extends [`ICardListProps`](./card-list#props) | +| items | `IItem[]` | - | An array of elements of type IItem that allows you to populate the list items. | +| ... | - | - | Extends [`ICardListProps`](./card-list#props) | + +## IItem + +| Attribute | Type | Description | +| ----------------- | -------- | --------------------------------------- | +| color | `string` | Color displayed to the left of the text | +| description | `string` | Element below the title | +| details | `string` | Element element below details | +| title | `string` | Item title | From de874a489a12c30240bb6039b63a7ff3d9d5f5cd Mon Sep 17 00:00:00 2001 From: vapersmile Date: Tue, 27 Feb 2024 14:42:19 +0100 Subject: [PATCH 3/4] feat: fix pr from Quentin --- docs/components/01-item-list.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/components/01-item-list.mdx b/docs/components/01-item-list.mdx index 5a07d22..c2ee15b 100644 --- a/docs/components/01-item-list.mdx +++ b/docs/components/01-item-list.mdx @@ -19,8 +19,8 @@ import { GitHubLogo } from '../../src/icons/GitHubLogo'; link: 'https://github.com/Smile-SA/react-front-kit/blob/main/packages/react-front-kit/src/Components/ItemList/ItemList.tsx', }} > - Display a list of simple items with a title, a color, a details section, and a - description. + Displays a list of simple items with a title, a color, a details section, and + a description. ## Storybook Docs @@ -40,5 +40,5 @@ import { GitHubLogo } from '../../src/icons/GitHubLogo'; | ----------------- | -------- | --------------------------------------- | | color | `string` | Color displayed to the left of the text | | description | `string` | Element below the title | -| details | `string` | Element element below details | +| details | `string` | Element below details | | title | `string` | Item title | From 6f953ec5b940684fadb804549d41e88a0bc3320e Mon Sep 17 00:00:00 2001 From: pereag Date: Wed, 28 Feb 2024 15:50:05 +0100 Subject: [PATCH 4/4] feat: update ItemList component to EventList component --- docs/components/01-event-list.mdx | 30 +++++++++++++++++++++ docs/components/01-item-list.mdx | 44 ------------------------------- 2 files changed, 30 insertions(+), 44 deletions(-) create mode 100644 docs/components/01-event-list.mdx delete mode 100644 docs/components/01-item-list.mdx diff --git a/docs/components/01-event-list.mdx b/docs/components/01-event-list.mdx new file mode 100644 index 0000000..743acf7 --- /dev/null +++ b/docs/components/01-event-list.mdx @@ -0,0 +1,30 @@ +import { GitHubLogo } from '../../src/icons/GitHubLogo'; + +# Event list + + + Simple item with a title, a color, a details section, and a description. + + +## Storybook Docs + + + +## Props + +| Name | Type | Default | Description | +| ----------------- | ----------- | ------- | --------------------------------------- | +| color | `string` | - | Color displayed to the left of the text | +| description | `ReactNode` | - | Element below the title | +| details | `ReactNode` | - | Element below details | +| title | `ReactNode` | - | Item title | diff --git a/docs/components/01-item-list.mdx b/docs/components/01-item-list.mdx deleted file mode 100644 index c2ee15b..0000000 --- a/docs/components/01-item-list.mdx +++ /dev/null @@ -1,44 +0,0 @@ -import { GitHubLogo } from '../../src/icons/GitHubLogo'; - -# Item list - -, - }, - ]} - importExample="import { ItemList } from '@smile/react-front-kit';" - packageInfo={{ - label: '@smile/react-front-kit', - link: 'https://www.npmjs.com/package/@smile/react-front-kit', - }} - sourceInfo={{ - link: 'https://github.com/Smile-SA/react-front-kit/blob/main/packages/react-front-kit/src/Components/ItemList/ItemList.tsx', - }} -> - Displays a list of simple items with a title, a color, a details section, and - a description. - - -## Storybook Docs - - - -## Props - -| Name | Type | Default | Description | -| ----------------- | --------- | ------- | ------------------------------------------------------------------------------ | -| items | `IItem[]` | - | An array of elements of type IItem that allows you to populate the list items. | -| ... | - | - | Extends [`ICardListProps`](./card-list#props) | - -## IItem - -| Attribute | Type | Description | -| ----------------- | -------- | --------------------------------------- | -| color | `string` | Color displayed to the left of the text | -| description | `string` | Element below the title | -| details | `string` | Element below details | -| title | `string` | Item title |