feat(new tool): iban validation and parser (#591)

This commit is contained in:
Corentin THOMASSET 2023-08-27 20:12:31 +02:00 committed by GitHub
parent 81bfe57cb8
commit 3a63837d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 278 additions and 1 deletions

View file

@ -0,0 +1,3 @@
<template>
<c-text-copyable value="value" displayed-value="displayedValue" />
</template>

View file

@ -0,0 +1,17 @@
<script setup lang="ts">
import { useCopy } from '@/composable/copy';
const props = withDefaults(defineProps<{ value?: string; displayedValue?: string; showIcon?: boolean }>(), { value: '', displayedValue: undefined, showIcon: true });
const { value, displayedValue, showIcon } = toRefs(props);
const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
</script>
<template>
<c-tooltip :tooltip="isJustCopied ? 'Copied!' : 'Copy to clipboard'" cursor-pointer @click="copy">
<span flex items-center gap-2>
{{ displayedValue ?? value }}
<icon-mdi-content-copy v-if="showIcon" op-40 />
</span>
</c-tooltip>
</template>