textOverflow.stories.js 744 B

1234567891011121314151617181920212223242526272829303132333435
  1. import React from 'react';
  2. import TextOverflow from 'app/components/textOverflow';
  3. export default {
  4. title: 'Core/Style/Text',
  5. args: {
  6. isParagraph: false,
  7. ellipsisDirection: 'right',
  8. },
  9. argTypes: {
  10. ellipsisDirection: {
  11. control: {
  12. type: 'select',
  13. options: ['left', 'right'],
  14. },
  15. },
  16. },
  17. };
  18. export const _TextOverflow = ({...args}) => (
  19. <div style={{width: 50}}>
  20. <TextOverflow {...args}>AReallyLongTextString</TextOverflow>
  21. </div>
  22. );
  23. _TextOverflow.storyName = 'TextOverflow';
  24. _TextOverflow.parameters = {
  25. docs: {
  26. description: {
  27. story:
  28. 'Simple component that adds "text-overflow: ellipsis" and "overflow: hidden", still depends on container styles',
  29. },
  30. },
  31. };