mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
parent
8d5ef9c93e
commit
a9460e944d
5 changed files with 59 additions and 9 deletions
|
@ -14,6 +14,20 @@
|
|||
/** Set to `true` to disable the option */
|
||||
export let disabled = false;
|
||||
|
||||
let className = undefined;
|
||||
|
||||
/**
|
||||
* Specify the class of the `option` element
|
||||
* @type {string}
|
||||
*/
|
||||
export { className as class };
|
||||
|
||||
/**
|
||||
* Specify the style of the `option` element
|
||||
* @type {string}
|
||||
*/
|
||||
export let style = undefined;
|
||||
|
||||
import { getContext, onMount } from "svelte";
|
||||
|
||||
const id = "ccs-" + Math.random().toString(36);
|
||||
|
@ -38,8 +52,8 @@
|
|||
hidden="{hidden}"
|
||||
selected="{selected}"
|
||||
class:bx--select-option="{true}"
|
||||
class="{$$restProps.class}"
|
||||
style="{$$restProps.style}"
|
||||
class="{className}"
|
||||
style="{style}"
|
||||
>
|
||||
{text || value}
|
||||
</option>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue