2021-03-29 17:32:43 +02:00
|
|
|
<script lang="typescript">
|
|
|
|
export let className: string;
|
|
|
|
export let onChange: (event: ChangeEvent) => void;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-03-29 21:05:30 +02:00
|
|
|
button {
|
2021-03-29 17:32:43 +02:00
|
|
|
display: inline-block;
|
2021-03-29 23:43:48 +02:00
|
|
|
vertical-align: middle;
|
2021-03-30 02:39:54 +02:00
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
2021-03-29 21:05:30 +02:00
|
|
|
|
|
|
|
padding: 0;
|
2021-03-30 02:39:54 +02:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: #eee;
|
|
|
|
}
|
2021-03-29 21:05:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
span {
|
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2021-03-30 02:39:54 +02:00
|
|
|
cursor: pointer;
|
2021-03-29 17:32:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
input {
|
|
|
|
opacity: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2021-03-30 02:39:54 +02:00
|
|
|
cursor: pointer;
|
2021-03-29 17:32:43 +02:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2021-03-30 00:51:44 +02:00
|
|
|
<button>
|
|
|
|
<span class={className}> <input type="color" on:change={onChange} /> </span>
|
|
|
|
</button>
|