The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
725 B

  1. import React from 'react';
  2. import { storiesOf } from '@storybook/react';
  3. import CharacterCounter from 'mastodon/features/compose/components/character_counter';
  4. storiesOf('CharacterCounter', module)
  5. .add('no text', () => {
  6. const text = '';
  7. return <CharacterCounter text={text} max={500} />;
  8. })
  9. .add('a few strings text', () => {
  10. const text = '0123456789';
  11. return <CharacterCounter text={text} max={500} />;
  12. })
  13. .add('the same text', () => {
  14. const text = '01234567890123456789';
  15. return <CharacterCounter text={text} max={20} />;
  16. })
  17. .add('over text', () => {
  18. const text = '01234567890123456789012345678901234567890123456789';
  19. return <CharacterCounter text={text} max={10} />;
  20. });