1
1
import { ArgsTable , Canvas , Meta , Story } from ' @storybook/addon-docs/blocks' ;
2
- import { createSelectArgTypes } from ' @shared/stories/createSelectArgTypes' ;
3
- import { DocsHeader } from ' @shared/stories/DocsHeader' ;
4
- import { Option } from ' @ui5/webcomponents-react/lib/Option' ;
5
2
import { Select } from ' @ui5/webcomponents-react/lib/Select' ;
6
3
import { ValueState } from ' @ui5/webcomponents-react/lib/ValueState' ;
4
+ import { Option } from ' @ui5/webcomponents-react/lib/Option' ;
5
+ import { createSelectArgTypes } from ' @shared/stories/createSelectArgTypes' ;
6
+ import { DocsHeader } from ' @shared/stories/DocsHeader' ;
7
7
import { DocsCommonProps } from ' @shared/stories/DocsCommonProps' ;
8
8
9
9
<Meta
@@ -13,32 +13,48 @@ import { DocsCommonProps } from '@shared/stories/DocsCommonProps';
13
13
argTypes = { {
14
14
... createSelectArgTypes ({ valueState: ValueState }),
15
15
... DocsCommonProps ,
16
- children: {
17
- type: null
18
- }
16
+ children: { control: { disable: true } },
17
+ valueStateMessage: { control: { disable: true } }
19
18
}}
20
19
args = { {
21
- valueState: ValueState .None
20
+ valueState: ValueState .None ,
21
+ style: {},
22
+ className: ' ' ,
23
+ tooltip: ' ' ,
24
+ slot: ' ' ,
25
+ ref: null
22
26
}}
23
27
/>
24
28
25
29
<DocsHeader />
26
30
27
31
<Canvas >
28
32
<Story name = " Default" >
29
- { (props ) => (
30
- <Select disabled = { props .disabled } name = { props .name } valueState = { props .valueState } onChange = { props .onChange } >
31
- <Option >Option 1</Option >
32
- <Option >Option 2</Option >
33
- <Option >Option 3</Option >
34
- <Option >Option 4</Option >
35
- <Option >Option 5</Option >
36
- </Select >
37
- )}
33
+ { (args ) => {
34
+ return (
35
+ <Select { ... args } >
36
+ <Option >Option 1</Option >
37
+ <Option >Option 2</Option >
38
+ <Option >Option 3</Option >
39
+ <Option >Option 4</Option >
40
+ <Option >Option 5</Option >
41
+ </Select >
42
+ );
43
+ }}
38
44
</Story >
39
45
</Canvas >
40
46
41
47
<ArgsTable story = " ." />
48
+ <div style = { { fontFamily: ' var(--sapFontFamily)' , fontSize: ' var(--sapFontSize)' , color: ' var(--sapTextColor)' }} >
49
+ <h3 >Keyboard Handling</h3 >
50
+ The <code >Select</code > provides advanced keyboard handling. If the <code >Select</code > is focused, you can open or close
51
+ the drop-down by pressing <code >F4</code >, <code >ALT+UP</code > or <code >ALT+DOWN</code > keys. Once the drop-down is opened,
52
+ you can use the <code >UP</code > and <code >DOWN</code > arrow keys to navigate through the available options and select one
53
+ by pressing the <code >Space</code > or <code >Enter</code > keys. <br />
54
+ </div >
55
+
56
+ <br />
57
+ <br />
42
58
43
59
## Recipes
44
60
0 commit comments