Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/card list #15

Merged
6 commits merged into from
Feb 27, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/components/01-card-list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { GitHubLogo } from '../../src/icons/GitHubLogo';

# Card List

<Description
extendsInfo={[
{
label: 'ScrollArea',
link: 'https://v6.mantine.dev/core/scroll-area/',
},
]}
importExample="import { CardList } 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/CardList/CardList.tsx',
}}
>
Renders a section of card containing a list of items with the option of having
or not having a separator and a vertical scrolling bar
</Description>

## Storybook Docs

<StorybookEmbed storyId="3-custom-components-CardList" height="820" />

## Props

| Name | Type | Default | Description |
| -------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| children <Required/> | `ReactNode[]` | - | Table of items to be displayed in the component's list. |
| h | `string` | - | Height of component props from [scrollArea props](https://v6.mantine.dev/core/group/?t=props) from Mantine. If the component's height is smaller than its content, a vertical scrollbar appears. |
This conversation was marked as resolved.
Show resolved Hide resolved
| separator | `boolean` | `true` | Enable or disable the display of the separator between items. |
| spacing | `MantineNumberSize` | `"xl"` | Space between items. |
This conversation was marked as resolved.
Show resolved Hide resolved
| ... | | - | Extends [scrollArea props](https://v6.mantine.dev/core/group/?t=props) from Mantine |
This conversation was marked as resolved.
Show resolved Hide resolved
Loading