FieldInputEmail.stories.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. import { Story } from '@storybook/vue3'
  3. import { FormKit } from '@formkit/vue'
  4. import defaultArgTypes from '@stories/support/form/field/defaultArgTypes'
  5. import { FieldArgs } from '@stories/types/form'
  6. export default {
  7. title: 'Form/Field/Inputs/Email',
  8. component: FormKit,
  9. argTypes: {
  10. ...defaultArgTypes,
  11. placeholder: {
  12. name: 'placeholder',
  13. type: { name: 'text', required: false },
  14. desciption: '',
  15. table: {
  16. type: { summary: 'text' },
  17. },
  18. control: {
  19. type: 'text',
  20. },
  21. },
  22. },
  23. parameters: {
  24. docs: {
  25. description: {
  26. component:
  27. '[FormKit Built-In - Email](https://formkit.com/inputs/email)',
  28. },
  29. },
  30. },
  31. }
  32. const Template: Story<FieldArgs> = (args: FieldArgs) => ({
  33. components: { FormKit },
  34. setup() {
  35. return { args }
  36. },
  37. template: '<FormKit type="email" v-bind="args"/>',
  38. })
  39. export const Default = Template.bind({})
  40. Default.args = {
  41. label: 'Email',
  42. name: 'email',
  43. placeholder: 'Enter your email address',
  44. }