闭社主体 forked from https://github.com/tootsuite/mastodon
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
776 B

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