editableText.stories.js 732 B

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