form-old-fields.stories.js 815 B

1234567891011121314151617181920212223242526272829303132333435
  1. import React from 'react';
  2. import {withInfo} from '@storybook/addon-info';
  3. import {Form as LegacyForm, PasswordField, BooleanField} from 'app/components/forms';
  4. export default {
  5. title: 'Forms/Old/Fields',
  6. };
  7. export const _PasswordField = withInfo({
  8. text: 'Password input',
  9. propTablesExclude: [LegacyForm],
  10. })(() => (
  11. <LegacyForm>
  12. <PasswordField hasSavedValue name="password" label="password" />
  13. </LegacyForm>
  14. ));
  15. _PasswordField.story = {
  16. name: 'PasswordField',
  17. };
  18. export const _BooleanField = withInfo({
  19. text: 'Boolean field (i.e. checkbox)',
  20. propTablesExclude: [LegacyForm],
  21. })(() => (
  22. <LegacyForm>
  23. <BooleanField name="field" />
  24. <BooleanField name="disabled-field" disabled disabledReason="This is off." />
  25. </LegacyForm>
  26. ));
  27. _BooleanField.story = {
  28. name: 'BooleanField',
  29. };