The code powering m.abunchtell.com https://m.abunchtell.com
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

22 рядки
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. });