Thumbnail Grid
Renders a grid of Thumbnails with an
ActionBar displaying mass actions on selected thumbnails
- Import
import { ThumbnailGrid } from '@smile/haring-react'; - Extends SimpleGrid
- Source View Source Code
- Package @smile/haring-react
- Storybook Storybook
Storybook Docs
Props
| Name | Type | Default | Description |
|---|---|---|---|
| thumbnails * | IThumbnail[] | - | Array of objects to render as <Thumbnail> in the grid |
| actions | IThumbnailAction[] | [] | Array of IAction for individual thumbnails or mass action shown on the top ActionBar |
| selectedElementsText | (numberOfSelectedElements: number) => string | (n: number) => `${n} selected file${n > 1 ? 's' : ''}` | Function used to generate the string shown in the ActionBar, when items are selected |
| onThumbnailClick | (item: IThumbnail, index: number) => void | - | Called when a <Thumbnail> is clicked |
| ... | - | - | extends SimpleGrid props |