FieldInputTime.stories.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/Time',
  8. component: FormKit,
  9. argTypes: {
  10. ...defaultArgTypes,
  11. min: {
  12. name: 'min',
  13. type: { name: 'number', required: false },
  14. desciption: '',
  15. table: {
  16. type: { summary: 'number' },
  17. },
  18. control: {
  19. type: 'number',
  20. },
  21. },
  22. max: {
  23. name: 'max',
  24. type: { name: 'number', required: false },
  25. desciption: '',
  26. table: {
  27. type: { summary: 'number' },
  28. },
  29. control: {
  30. type: 'number',
  31. },
  32. },
  33. step: {
  34. name: 'step',
  35. type: { name: 'number', required: false },
  36. desciption: '',
  37. table: {
  38. type: { summary: 'number' },
  39. defaultValue: {
  40. summary: 'auto',
  41. },
  42. },
  43. control: {
  44. type: 'number',
  45. },
  46. },
  47. },
  48. parameters: {
  49. docs: {
  50. description: {
  51. component: '[FormKit Built-In - Time](https://formkit.com/inputs/time)',
  52. },
  53. },
  54. },
  55. }
  56. const Template: Story<FieldArgs> = (args: FieldArgs) => ({
  57. components: { FormKit },
  58. setup() {
  59. return { args }
  60. },
  61. template: '<FormKit type="time" v-bind="args"/>',
  62. })
  63. export const Default = Template.bind({})
  64. Default.args = {
  65. label: 'Time',
  66. name: 'time',
  67. }