File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
shared/aries-core/src/stories/components Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { Meta , StoryObj } from '@storybook/react' ;
2+ import { Select } from 'grommet' ;
3+ import {
4+ a11yTitleArg ,
5+ disabledArg ,
6+ placeholderArg ,
7+ } from '../utils/commonArgs' ;
8+
9+ const meta = {
10+ title : 'Components/Select' ,
11+ component : Select ,
12+ argTypes : {
13+ a11yTitle : a11yTitleArg ,
14+ clear : {
15+ control : { type : 'boolean' } ,
16+ } ,
17+ disabled : disabledArg ,
18+ open : {
19+ control : { type : 'boolean' } ,
20+ } ,
21+ options : {
22+ control : { type : 'object' } ,
23+ } ,
24+ placeholder : placeholderArg ,
25+ } ,
26+ } satisfies Meta < typeof Select > ;
27+
28+ export default meta ;
29+ type Story = StoryObj < typeof meta > ;
30+
31+ export const Default = {
32+ name : 'Select' ,
33+ render : args => < Select { ...args } /> ,
34+ args : {
35+ a11yTitle : 'Select a size' ,
36+ clear : false ,
37+ disabled : false ,
38+ open : false ,
39+ options : [ 'small' , 'medium' , 'large' ] ,
40+ placeholder : 'Select an option...' ,
41+ } ,
42+ } satisfies Story ;
You can’t perform that action at this time.
0 commit comments