editableText.stories.js 735 B

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import styled from '@emotion/styled';
  3. import {action} from '@storybook/addon-actions';
  4. import EditableText from 'app/components/editableText';
  5. import space from 'app/styles/space';
  6. export default {
  7. title: 'Forms/EditableText',
  8. component: EditableText,
  9. };
  10. export const _EditableText = () => {
  11. return (
  12. <Container>
  13. <EditableText value="Editable Text" onChange={action('onChange')} />
  14. </Container>
  15. );
  16. };
  17. _EditableText.storyName = 'EditableText';
  18. _EditableText.parameters = {
  19. docs: {
  20. description: {
  21. story:
  22. 'Inline text edit. Keyboard and mouse can be used for providing or changing data.',
  23. },
  24. },
  25. };
  26. const Container = styled('div')`
  27. padding: ${space(3)};
  28. `;