multipleCheckbox.stories.js 741 B

12345678910111213141516171819202122232425262728293031
  1. import {action} from '@storybook/addon-actions';
  2. import MultipleCheckbox from 'sentry/components/forms/controls/multipleCheckbox';
  3. export default {
  4. title: 'Components/Forms/Controls/Multiple Checkbox',
  5. component: MultipleCheckbox,
  6. args: {
  7. choices: [
  8. ['foo', 'Foo'],
  9. ['bar', 'Bar'],
  10. ['baz', 'Baz'],
  11. ['quux', 'Quux'],
  12. ],
  13. value: ['bar'],
  14. onChange: (v, e) => {
  15. action('MultipleCheckbox change')(v, e);
  16. },
  17. },
  18. };
  19. export const _MultipleCheckbox = ({...args}) => <MultipleCheckbox {...args} />;
  20. _MultipleCheckbox.storyName = 'Multiple Checkbox';
  21. _MultipleCheckbox.parameters = {
  22. docs: {
  23. description: {
  24. story: 'Multiple Checkbox Control (controlled only atm)',
  25. },
  26. },
  27. };