Skip to content

Commit

Permalink
add default label
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteenkamp89 committed Apr 1, 2024
1 parent 7f5adef commit 728e26e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/plugins/oSnap/components/Input/FileInput/FileInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const props = defineProps<{
fileType: File['type'];
error?: string | undefined;
multiple?: boolean;
defaultLabel?: string;
}>();
const emit = defineEmits<{
Expand Down Expand Up @@ -107,9 +108,9 @@ watch(fileInputState, newState => {
<template v-else-if="fileInputState === 'VALID' && file">{{
file.name
}}</template>
<template v-else="fileInputState === 'IDLE'"
>Click to select file, or drag n drop</template
>
<template v-else="fileInputState === 'IDLE'">{{
props.defaultLabel ?? 'Click to select file, or drag n drop'
}}</template>
</span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ watch(safeFile, safeFile => {
</script>

<template>
<div class="text-skin-link mt-2">Import from Safe, or use the builder</div>
<FileInput
:error="error"
@update:file="handleFileChange"
:file-type="'application/json'"
:defaultLabel="'Import transactions from Safe file, drag and drop'"
/>
</template>

0 comments on commit 728e26e

Please sign in to comment.