textOverflow.stories.js 723 B

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