diff --git a/src/components/NeFileInput.vue b/src/components/NeFileInput.vue index dee8064..ddb59e4 100644 --- a/src/components/NeFileInput.vue +++ b/src/components/NeFileInput.vue @@ -16,6 +16,7 @@ interface FileInputProps { dropzoneLabel: string progress: number showProgress: boolean + accept: string | undefined } const props = withDefaults(defineProps(), { @@ -24,7 +25,8 @@ const props = withDefaults(defineProps(), { invalidMessage: '', progress: 0, showProgress: false, - dropzoneLabel: 'Drag and drop or click to upload' + dropzoneLabel: 'Drag and drop or click to upload', + accept: undefined }) const emit = defineEmits(['update:modelValue', 'select']) @@ -105,7 +107,7 @@ const dragOverHandler = (event: Event) => { {{ dropZoneText }}

- + @@ -57,3 +58,16 @@ export const Progress: Story = { }), args: { showProgress: true, progress: 75 } } + +export const Accept: Story = { + render: (args) => ({ + components: { NeFileInput }, + setup() { + return { args } + }, + template: template + }), + args: { + accept: 'image/*,.pdf' + } +}