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.

20 lines
730 B

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