Skip to content

Commit

Permalink
refactor(bnFileInput.story): remove redundant for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
fprebolledo committed Jul 21, 2023
1 parent a1645bd commit b2a92c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/BnFileInput/BnFileInput.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,16 @@ function isRequired(val: File[] | File | undefined) {
class="w-full"
>
<li
v-for="file in [value]"
:key="file.name"
class="flex w-full items-center border border-t-0 p-1 text-sm first:border-t"
>
<img
:src="imagePreviewPath(file)"
:src="imagePreviewPath(value)"
class="mr-2 h-6 w-6 rounded-full"
>
<span class="truncate">{{ file.name }}</span> ({{ file.size / 1000 }} KB)
<span class="truncate">{{ value.name }}</span> ({{ value.size / 1000 }} KB)
<button
class="ml-auto"
@click="removeFile(file)"
@click="removeFile(value)"
>
🗑
</button>
Expand Down

0 comments on commit b2a92c9

Please sign in to comment.