mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore: lift components folder
This commit is contained in:
parent
76df51674d
commit
2200b29b92
301 changed files with 57 additions and 76 deletions
|
@ -1,31 +0,0 @@
|
|||
<script>
|
||||
export let disabled = false;
|
||||
export let hidden = false;
|
||||
export let text = "";
|
||||
export let value = "";
|
||||
|
||||
import { getContext, onDestroy } from "svelte";
|
||||
|
||||
const ctx = getContext("Select") || getContext("TimePickerSelect");
|
||||
|
||||
let selected = false;
|
||||
|
||||
const unsubscribe = ctx.selectedValue.subscribe($ => {
|
||||
selected = $ === value;
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
unsubscribe();
|
||||
});
|
||||
</script>
|
||||
|
||||
<option
|
||||
{value}
|
||||
{disabled}
|
||||
{hidden}
|
||||
{selected}
|
||||
class:bx--select-option={true}
|
||||
class={$$restProps.class}
|
||||
style={$$restProps.style}>
|
||||
{text || value}
|
||||
</option>
|
Loading…
Add table
Add a link
Reference in a new issue