|
|
|
@ -1,8 +1,10 @@ |
|
|
|
<script> |
|
|
|
import FlatButton from "./FlatButton.svelte" |
|
|
|
import { createEventDispatcher } from "svelte" |
|
|
|
|
|
|
|
const dispatch = createEventDispatcher() |
|
|
|
|
|
|
|
export let format = "hex" |
|
|
|
export let onclick = format => {} |
|
|
|
|
|
|
|
let colorFormats = ["hex", "rgb", "hsl"] |
|
|
|
</script> |
|
|
|
@ -12,7 +14,7 @@ |
|
|
|
<FlatButton |
|
|
|
selected={format === text} |
|
|
|
{text} |
|
|
|
on:click={() => onclick(text)} /> |
|
|
|
on:click={() => dispatch('click', text)} /> |
|
|
|
{/each} |
|
|
|
</div> |
|
|
|
|
|
|
|
|