From b87a08e16004221f27996007c241bcc80470c33f Mon Sep 17 00:00:00 2001 From: usagi-f Date: Mon, 17 Apr 2017 17:34:33 +0900 Subject: Add function color remaining text (#1980) --- storybook/stories/character_counter.story.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 storybook/stories/character_counter.story.jsx (limited to 'storybook/stories') diff --git a/storybook/stories/character_counter.story.jsx b/storybook/stories/character_counter.story.jsx new file mode 100644 index 000000000..931d8a037 --- /dev/null +++ b/storybook/stories/character_counter.story.jsx @@ -0,0 +1,20 @@ +import { storiesOf } from '@kadira/storybook'; +import CharacterCounter from '../../app/assets/javascripts/components/features/compose/components/character_counter'; + +storiesOf('CharacterCounter', module) + .add('no text', () => { + const text = ''; + return ; + }) + .add('a few strings text', () => { + const text = '0123456789'; + return ; + }) + .add('the same text', () => { + const text = '01234567890123456789'; + return ; + }) + .add('over text', () => { + const text = '01234567890123456789012345678901234567890123456789'; + return ; + }); -- cgit