Skip to content

Commit

Permalink
feat(v-file-upload): added new file upload component
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Sep 14, 2021
1 parent bef4440 commit d5a911b
Show file tree
Hide file tree
Showing 2 changed files with 425 additions and 0 deletions.
58 changes: 58 additions & 0 deletions src/components/VFileUpload/VFileUpload.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import MyFileUpload from './VFileUpload.vue';

export default {
title: 'Components/Form/FileUpload',
component: MyFileUpload,
argTypes: {},
args: {
button: false,
full: false,
rounded: false,
image: false,
value: null,
modelValue: null,
accept: '',
inputProps: {},
name: '',
error: false,
errorMessages: [],
placeholder: 'Browse file...',
id: '',
},
};

const Template = (args) => ({
// Components used in your story `template` are defined in the `components` object
components: {
'my-component': MyFileUpload,
},
// The story's `args` need to be mapped into the template through the `setup()` method
setup() {
return {args};
},
// And then the `args` are bound to your component with `v-bind="args"`
template: `<my-component v-bind="args" />`,
});

export const Default = Template.bind({});
Default.args = {};

export const Button = Template.bind({});
Button.args = {
button: true,
};

export const Full = Template.bind({});
Full.args = {
full: true,
};

export const Rounded = Template.bind({});
Rounded.args = {
rounded: true,
};

export const Image = Template.bind({});
Image.args = {
image: true,
};
Loading

0 comments on commit d5a911b

Please sign in to comment.