mirror of https://github.com/Budibase/budibase.git
3 changed files with 0 additions and 75 deletions
@ -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> |
|
||||
Loading…
Reference in new issue