Removes Switcher component
This commit is contained in:
parent
630acef7fc
commit
0e786089f5
|
@ -1,47 +0,0 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let headings
|
||||
export let value
|
||||
</script>
|
||||
|
||||
<section>
|
||||
<header>
|
||||
{#each headings as heading}
|
||||
<span
|
||||
class:selected={value === heading.key}
|
||||
on:click={() => {
|
||||
value = heading.key
|
||||
dispatch('change', { heading })
|
||||
}}>
|
||||
{heading.title}
|
||||
</span>
|
||||
{/each}
|
||||
</header>
|
||||
<slot />
|
||||
</section>
|
||||
|
||||
<style>
|
||||
header {
|
||||
font-family: var(--font-sans);
|
||||
display: flex;
|
||||
margin-bottom: var(--spacing-l);
|
||||
}
|
||||
|
||||
span {
|
||||
margin-right: var(--spacing-xl);
|
||||
font-size: var(--font-size-m);
|
||||
font-weight: 500;
|
||||
color: var(--grey-5);
|
||||
}
|
||||
|
||||
span:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selected {
|
||||
color: var(--ink);
|
||||
}
|
||||
</style>
|
|
@ -1,27 +0,0 @@
|
|||
<script>
|
||||
import { View } from "svench";
|
||||
import Switcher from "./Switcher.svelte";
|
||||
|
||||
const items = [
|
||||
{
|
||||
title: "Apps",
|
||||
key: "APPS"
|
||||
},
|
||||
{
|
||||
title: "Deploy",
|
||||
key: "DEPLOY"
|
||||
},
|
||||
{
|
||||
title: "Settings",
|
||||
key: "SETTINGS"
|
||||
}
|
||||
]
|
||||
|
||||
let value = "APPS"
|
||||
</script>
|
||||
|
||||
<View name="default">
|
||||
<Switcher headings={items} bind:value={value}>
|
||||
Content
|
||||
</Switcher>
|
||||
</View>
|
|
@ -20,7 +20,6 @@ export { default as RadioGroup } from "./Form/RadioGroup.svelte"
|
|||
export { default as Checkbox } from "./Form/Checkbox.svelte"
|
||||
export { default as Home } from "./Links/Home.svelte"
|
||||
export { default as DetailSummary } from "./List/Items/DetailSummary.svelte"
|
||||
export { default as Switcher } from "./Switcher/Switcher.svelte"
|
||||
export { default as DropdownMenu } from "./DropdownMenu/DropdownMenu.svelte"
|
||||
export { default as Popover } from "./Popover/Popover.svelte"
|
||||
export { default as ProgressBar } from "./ProgressBar/ProgressBar.svelte"
|
||||
|
|
Loading…
Reference in New Issue