-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: updated SidebarFilter and SidebarMenu docs * refactor: renamed DocumentCard to DocumentBox * feat: added SummaryBox doc * feat: added compactStyle to ActionRowOverflow, added action example to SummaryBox stories
- Loading branch information
1 parent
15dc9f2
commit 0e37e97
Showing
7 changed files
with
123 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Action Row Overflow | ||
|
||
<Description | ||
extendsInfo={[ | ||
{ | ||
label: 'Group', | ||
link: 'https://v6.mantine.dev/core/group/', | ||
}, | ||
]} | ||
importExample="import { ActionRowOverflow } 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/ActionRowOverflow/ActionRowOverflow.tsx', | ||
}} | ||
> | ||
Renders an array of [`IAction`s](../shared-types/actions#iactiont) as | ||
[ActionIcons](https://v6.mantine.dev/core/action-icon/), with an option to | ||
show only a portion of the array and insert the rest into a menu | ||
</Description> | ||
|
||
## Storybook Docs | ||
|
||
<StorybookEmbed | ||
storyId="3-custom-components-actionrowoverflow--docs" | ||
height="820" | ||
/> | ||
|
||
## Props | ||
|
||
ActionBar takes a `<Data>` generic type that extends `Record<string, unknown>`. | ||
|
||
| Name | Type | Default | Description | | ||
| ---------------------------- | -------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| actionButtonProps | [`ButtonProps`](https://v6.mantine.dev/core/button/?t=props) | - | Extra props for the visible action buttons in default mode | | ||
| actionTooltipProps | [`TooltipProps`](https://v6.mantine.dev/core/tooltip/?t=props) | - | Extra props for the action tooltips, on the menu icon and on the action icons in compact mode | | ||
| actions | [`IAction`](./thumbnail#ithumbnailaction) `<Data \| Data[]>[]` | - | Array of [`IAction`](../shared-types/actions#iactiont) for the rendered action buttons or actions inside the menu | | ||
| isCompactStyle | `boolean` | `false` | Boolean value that determines the display style, either default (`false`) or compact (`true`) | | ||
| modalProps | [`IThumbnailAction[]`](./thumbnail#ithumbnailaction) | - | Extra props passed to the internal [Mantine Modal](https://v6.mantine.dev/core/modal/) component, used for actions with confirmation enabled | | ||
| overflowMenuLabel | `string` | `Other actions` | String used as both the `aria-label` and the Tooltip label of the menu button/icon | | ||
| rowActionNumber | `number` | `1` | Index value used to determine which actions will be displayed directly in the action column (before this index) or in the action menu (starting at this index) | | ||
| selectedElements <Required/> | `Data[]` | - | Array of currently selected elements, necessary for the `actions` to be able to pass those elements along | | ||
| ... | - | - | extends [Group props](https://v6.mantine.dev/core/group/?t=props) | |
10 changes: 5 additions & 5 deletions
10
docs/components/01-document-card.mdx → docs/components/01-document-box.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.