-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Some improvements for File input component
- Loading branch information
Showing
7 changed files
with
91 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
<template> | ||
<FileInput v-model="file" :dropzone="true"> | ||
<p class="!mt-1 text-xs text-gray-500 dark:text-gray-400"> | ||
SVG, PNG, JPG or GIF (MAX. 800x400px) | ||
</p> | ||
<p class="!mt-1 text-xs text-gray-500 dark:text-gray-400">SVG, PNG, JPG or GIF (MAX. 800x400px)</p> | ||
</FileInput> | ||
</template> | ||
|
||
<script setup> | ||
import FileInput from '../../../../src/components/FileInput/FileInput.vue' | ||
import { ref } from 'vue' | ||
const file = ref('') | ||
const file = ref(null) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<template> | ||
<div class='flex flex-col gap-5'> | ||
<FileInput size="xs" label="Small size" /> | ||
<FileInput size="sm" label="Default size" /> | ||
<FileInput size="lg" label="Large size" /> | ||
<div class="flex flex-col gap-5"> | ||
<FileInput size="xs" v-model="file" label="Small size" /> | ||
<FileInput size="sm" v-model="file" label="Default size" /> | ||
<FileInput size="lg" v-model="file" label="Large size" /> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import FileInput from '../../../../src/components/FileInput/FileInput.vue' | ||
import { ref } from 'vue' | ||
const file = ref(null) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
<template> | ||
<div> | ||
<FileInput multiple v-model="files" label="Upload file" /> | ||
<div class="mt-4 -mb-7 border-[1px] border-gray-300 dark:border-gray-600 p-2 rounded-md" v-if="files.length !== 0"> | ||
<div v-for="file in files" :id="file"> | ||
{{ file.name }} | ||
</div> | ||
<div> | ||
<FileInput multiple v-model="files" label="Upload file" /> | ||
<div class="mt-4 -mb-7 border-[1px] border-gray-300 dark:border-gray-600 p-2 rounded-md" v-if="files.length !== 0"> | ||
<div v-for="file in files" :key="file"> | ||
{{ file.name }} | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import FileInput from '../../../../src/components/FileInput/FileInput.vue' | ||
import { ref } from 'vue' | ||
const files = ref([]) | ||
</script> | ||
|
||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import FileInput from '../../../../src/components/FileInput/FileInput.vue' | ||
import { ref } from 'vue' | ||
const files = ref([]) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters