mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 16:26:28 +00:00
better typings
This commit is contained in:
parent
7eba454f1b
commit
284bbcbae2
@ -8,7 +8,7 @@
|
|||||||
import Icon from './Icon.svelte'
|
import Icon from './Icon.svelte'
|
||||||
|
|
||||||
export let label: string = ''
|
export let label: string = ''
|
||||||
export let value
|
export let value: string | number
|
||||||
|
|
||||||
export let copy: boolean = false
|
export let copy: boolean = false
|
||||||
export let random: boolean = false
|
export let random: boolean = false
|
||||||
@ -28,7 +28,7 @@
|
|||||||
hidden = !hidden
|
hidden = !hidden
|
||||||
}
|
}
|
||||||
function copyFN() {
|
function copyFN() {
|
||||||
copyToClipboard(value)
|
copyToClipboard(value.toString())
|
||||||
notify($t('home.copied_to_clipboard'))
|
notify($t('home.copied_to_clipboard'))
|
||||||
}
|
}
|
||||||
function randomFN() {
|
function randomFN() {
|
||||||
@ -53,13 +53,13 @@
|
|||||||
<input bind:value {...$$restProps} />
|
<input bind:value {...$$restProps} />
|
||||||
<div class="icons">
|
<div class="icons">
|
||||||
{#if isPassword}
|
{#if isPassword}
|
||||||
<Icon class="icon" icon={hidden ? 'eye-sharp' : 'eye-off-sharp'} on:click={toggle} />
|
<Icon class="icon" icon={hidden ? 'eye' : 'eye-off'} on:click={toggle} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if random}
|
{#if random}
|
||||||
<Icon class="icon" icon="dice-sharp" on:click={randomFN} />
|
<Icon class="icon" icon="dice" on:click={randomFN} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if copy}
|
{#if copy}
|
||||||
<Icon class="icon" icon="copy-sharp" on:click={copyFN} />
|
<Icon class="icon" icon="copy" on:click={copyFN} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if notification}
|
{#if notification}
|
||||||
|
Loading…
Reference in New Issue
Block a user