Components renaming (#225)
* refactor: eslint config adjusted for better diff's * refactor: stricter linting + dependencies updated * refactoring: paragraph component - component - docs * refactoring: heading component - component - docs * Update docs/components/heading.md Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com> * refactoring: link component - component - docs * refactoring: image component - component - docs * refactoring: alert component - component - docs * refactoring: avatar component - component - docs * refactoring: removed unnecessary code - component names come from the file name * refactoring: breadcrumb component - component - docs * refactoring: accordion component - component - docs * refactoring: buttom component - component - docs * refactoring: badge component - component - docs * refactoring: card component - component - docs * refactoring: order of components in docs updated * refactoring: unnecessary semicolons removed * refactoring: button group component - component - docs * refactoring: carousel component - component - docs * refactoring: dropdown component - component - docs * refactoring: footer component - component - docs * refactoring:list-group component - component - docs * refactoring: modal component - component - docs * refactoring: navbar component - component - docs * refactoring: pagination component - component - docs * refactoring: progress component - component - docs * refactoring: rating component - component - docs * refactoring: spinner component - component - docs * refactoring: table component - component - docs * refactoring: tabs component - component - docs * feat: Updated pagination examples * lint: Lister fixes * feat: Sidebar component and some fixes * feat: Input component * feat: Some fixes * feat: Some fixes * chore: update deps * refactor: removed old Modal component * refactor: radio component and some fixes * fix: fixed path error * refactor: Range component * refactoring: timeline component - component - docs * refactor: Select component * refactoring: toast component - component - docs * refactoring: tooltip component - component - docs * refactoring: sidebar component - component - docs * refactoring: input component - component - docs * refactoring: fileInput component - component - docs * refactoring: select component - component - docs * refactoring: textarea component - component - docs * refactoring: checkbox component - component - docs * refactoring: radio component - component - docs * refactoring: toggle component - component - docs * refactoring: range component - component - docs * local configs linted * documentation quick start updated * flowbite-themable refactored to fit new linters and style guide * random linter fixes * refactoring: toast-provider component - component - docs * final linter fixes * lint: Linter fixes * fix: Fixed types * fix: Fixed card component * docs: Updated card examples * fix: Fixed tabs * refactor: Heading component refactoring * Fwb rename - few fixes after component review (#237) * fix: button documentation * fix: model type in range examples * chore: Toast marked as WIP --------- Co-authored-by: Sqrcz <naorniakowski@slashlab.pl> Co-authored-by: Sqrcz <naorniakowski@gmail.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<script setup>
|
||||
import FileInpDefault from './fileInput/examples/FileInpDefault.vue'
|
||||
import FileInpHelper from './fileInput/examples/FileInpHelper.vue'
|
||||
import FileInpSize from './fileInput/examples/FileInpSize.vue'
|
||||
import FileInpDropZone from './fileInput/examples/FileInpDropZone.vue'
|
||||
import MultipleFile from './fileInput/examples/MultipleFile.vue'
|
||||
import FwbFileInputExample from './fileInput/examples/FwbFileInputExample.vue'
|
||||
import FwbFileInputExampleHelper from './fileInput/examples/FwbFileInputExampleHelper.vue'
|
||||
import FwbFileInputExampleSize from './fileInput/examples/FwbFileInputExampleSize.vue'
|
||||
import FwbFileInputExampleDropZone from './fileInput/examples/FwbFileInputExampleDropZone.vue'
|
||||
import FwbFileInputExampleMultiple from './fileInput/examples/FwbFileInputExampleMultiple.vue'
|
||||
</script>
|
||||
|
||||
# Vue FileInput - Flowbite
|
||||
@@ -16,88 +16,92 @@ Original reference: [https://flowbite.com/docs/forms/file-input/](https://flowbi
|
||||
|
||||
## File upload example
|
||||
|
||||
<fwb-file-input-example />
|
||||
```vue
|
||||
<template>
|
||||
<FileInput v-model="file" label="Upload file" />
|
||||
<fwb-file-input v-model="file" label="Upload file" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FileInput from 'flowbite-vue'
|
||||
import { ref } from 'vue'
|
||||
import { FwbFileInput } from 'flowbite-vue'
|
||||
|
||||
const file = ref()
|
||||
const file = ref(null)
|
||||
</script>
|
||||
```
|
||||
|
||||
<FileInpDefault />
|
||||
|
||||
## Multiple File upload
|
||||
|
||||
<fwb-file-input-example-multiple />
|
||||
```vue
|
||||
<template>
|
||||
<FileInput multiple v-model="file" label="Multiple upload" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FileInput from 'flowbite-vue'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const file = ref([])
|
||||
</script>
|
||||
```
|
||||
|
||||
<MultipleFile />
|
||||
|
||||
|
||||
## Helper text
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<FileInput label="Upload file">
|
||||
<p class='!mt-1 text-sm text-gray-500 dark:text-gray-300'>SVG, PNG, JPG or GIF (MAX. 800x400px).</p>
|
||||
</FileInput>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FileInput from 'flowbite-vue'
|
||||
</script>
|
||||
```
|
||||
|
||||
<FileInpHelper />
|
||||
|
||||
## Sizes
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<div>
|
||||
<FileInput size="xs" label="Small size" />
|
||||
<FileInput size="sm" label="Default size" />
|
||||
<FileInput size="lg" label="Large size" />
|
||||
<fwb-file-input v-model="files" label="Upload file" multiple />
|
||||
<div v-if="files.length !== 0" class="mt-4 border-[1px] border-gray-300 dark:border-gray-600 p-2 rounded-md">
|
||||
<div v-for="file in files" :key="file">
|
||||
{{ file.name }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FileInput from 'flowbite-vue'
|
||||
import { ref } from 'vue'
|
||||
import { FwbFileInput } from 'flowbite-vue'
|
||||
|
||||
const files = ref([])
|
||||
</script>
|
||||
```
|
||||
|
||||
<FileInpSize />
|
||||
## Helper text
|
||||
|
||||
<fwb-file-input-example-helper />
|
||||
```vue
|
||||
<template>
|
||||
<fwb-file-input v-model="file" label="Upload file">
|
||||
<p class="!mt-1 text-sm text-gray-500 dark:text-gray-300">
|
||||
SVG, PNG, JPG or GIF (MAX. 800x400px).
|
||||
</p>
|
||||
</fwb-file-input>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { FwbFileInput } from 'flowbite-vue'
|
||||
|
||||
const file = ref(null)
|
||||
</script>
|
||||
```
|
||||
|
||||
## Sizes
|
||||
|
||||
<fwb-file-input-example-size />
|
||||
```vue
|
||||
<template>
|
||||
<fwb-file-input v-model="file" label="Small size" size="xs" />
|
||||
<fwb-file-input v-model="file" label="Default size" size="sm" />
|
||||
<fwb-file-input v-model="file" label="Large size" size="lg" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { FwbFileInput } from 'flowbite-vue'
|
||||
|
||||
const file = ref(null)
|
||||
</script>
|
||||
```
|
||||
|
||||
## Dropone
|
||||
|
||||
|
||||
<fwb-file-input-example-drop-zone />
|
||||
```vue
|
||||
<template>
|
||||
<FileInput :dropzone="true">
|
||||
<p class="!mt-1 text-xs text-gray-500 dark:text-gray-400">
|
||||
SVG, PNG, JPG or GIF (MAX. 800x400px)
|
||||
</p>
|
||||
</FileInput>
|
||||
<fwb-file-input v-model="file" dropzone />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FileInput from 'flowbite-vue'
|
||||
import { ref } from 'vue'
|
||||
import { FwbFileInput } from 'flowbite-vue'
|
||||
|
||||
const file = ref(null)
|
||||
</script>
|
||||
```
|
||||
|
||||
<FileInpDropZone />
|
||||
|
||||
Reference in New Issue
Block a user