chore: lift components folder

This commit is contained in:
Eric Liu 2020-07-19 09:06:08 -07:00
commit 2200b29b92
301 changed files with 57 additions and 76 deletions

View file

@ -0,0 +1,34 @@
<script>
export let selected = undefined;
export let border = false;
export let selection = false;
import { createEventDispatcher, setContext } from "svelte";
import { writable } from "svelte/store";
const dispatch = createEventDispatcher();
const selectedValue = writable(selected);
setContext("StructuredListWrapper", {
selectedValue,
update: value => {
selectedValue.set(value);
}
});
$: selected = $selectedValue;
$: dispatch("change", $selectedValue);
</script>
<section
aria-label="Structured list section"
class:bx--structured-list={true}
class:bx--structured-list--border={border}
class:bx--structured-list--selection={selection}
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave>
<slot />
</section>