File tree Expand file tree Collapse file tree 5 files changed +59
-9
lines changed Expand file tree Collapse file tree 5 files changed +59
-9
lines changed Original file line number Diff line number Diff line change @@ -3208,12 +3208,14 @@ None.
32083208
32093209### Props
32103210
3211- | Prop name | Required | Kind | Reactive | Type | Default value | Description |
3212- | :-------- | :------- | :--------------- | :------- | --------------------------------- | ------------------ | ----------------------------------- |
3213- | value | No | <code >let</code > | No | <code >string | ; number</code > | <code >""</code > | Specify the option value |
3214- | text | No | <code >let</code > | No | <code >string</code > | <code >""</code > | Specify the option text |
3215- | hidden | No | <code >let</code > | No | <code >boolean</code > | <code >false</code > | Set to ` true ` to hide the option |
3216- | disabled | No | <code >let</code > | No | <code >boolean</code > | <code >false</code > | Set to ` true ` to disable the option |
3211+ | Prop name | Required | Kind | Reactive | Type | Default value | Description |
3212+ | :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ----------------------------------------- |
3213+ | value | No | <code >let</code > | No | <code >string | ; number</code > | <code >""</code > | Specify the option value |
3214+ | text | No | <code >let</code > | No | <code >string</code > | <code >""</code > | Specify the option text |
3215+ | hidden | No | <code >let</code > | No | <code >boolean</code > | <code >false</code > | Set to ` true ` to hide the option |
3216+ | disabled | No | <code >let</code > | No | <code >boolean</code > | <code >false</code > | Set to ` true ` to disable the option |
3217+ | class | No | <code >let</code > | No | <code >string</code > | <code >undefined</code > | Specify the class of the ` option ` element |
3218+ | style | No | <code >let</code > | No | <code >string</code > | <code >undefined</code > | Specify the style of the ` option ` element |
32173219
32183220### Slots
32193221
Original file line number Diff line number Diff line change 1045210452 "isRequired" : false ,
1045310453 "constant" : false ,
1045410454 "reactive" : false
10455+ },
10456+ {
10457+ "name" : " class" ,
10458+ "kind" : " let" ,
10459+ "description" : " Specify the class of the `option` element" ,
10460+ "type" : " string" ,
10461+ "isFunction" : false ,
10462+ "isFunctionDeclaration" : false ,
10463+ "isRequired" : false ,
10464+ "constant" : false ,
10465+ "reactive" : false
10466+ },
10467+ {
10468+ "name" : " style" ,
10469+ "kind" : " let" ,
10470+ "description" : " Specify the style of the `option` element" ,
10471+ "type" : " string" ,
10472+ "isFunction" : false ,
10473+ "isFunctionDeclaration" : false ,
10474+ "isRequired" : false ,
10475+ "constant" : false ,
10476+ "reactive" : false
1045510477 }
1045610478 ],
1045710479 "moduleExports" : [],
Original file line number Diff line number Diff line change 1414 /** Set to `true` to disable the option */
1515 export let disabled = false ;
1616
17+ let className = undefined ;
18+
19+ /**
20+ * Specify the class of the `option` element
21+ * @type {string}
22+ */
23+ export { className as class };
24+
25+ /**
26+ * Specify the style of the `option` element
27+ * @type {string}
28+ */
29+ export let style = undefined ;
30+
1731 import { getContext , onMount } from " svelte" ;
1832
1933 const id = " ccs-" + Math .random ().toString (36 );
3852 hidden= " {hidden}"
3953 selected= " {selected}"
4054 class : bx-- select- option= " {true}"
41- class = " {$$restProps.class }"
42- style= " {$$restProps. style}"
55+ class = " {className }"
56+ style= " {style}"
4357>
4458 {text || value}
4559< / option>
Original file line number Diff line number Diff line change 88 </script >
99
1010<Select labelText =" Carbon theme" selected =" g10" >
11- <SelectItem value =" white" text =" White" />
11+ <SelectItem value =" white" text =" White" class = " " style = " " />
1212 <SelectItem value =" g10" text =" Gray 10" />
1313 <SelectItem value =" g90" text =" Gray 90" />
1414 <SelectItem value =" g100" text =" Gray 100" />
Original file line number Diff line number Diff line change @@ -24,6 +24,18 @@ export interface SelectItemProps {
2424 * @default false
2525 */
2626 disabled ?: boolean ;
27+
28+ /**
29+ * Specify the class of the `option` element
30+ * @default undefined
31+ */
32+ class ?: string ;
33+
34+ /**
35+ * Specify the style of the `option` element
36+ * @default undefined
37+ */
38+ style ?: string ;
2739}
2840
2941export default class SelectItem extends SvelteComponentTyped <
You can’t perform that action at this time.
0 commit comments