From 9f2ab40b7602bc3df26ebb093b484b9917768f69 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 7 Jun 2019 11:25:54 +0200 Subject: Make buttons flexible in height --- uidev/src/stories/button.stories.tsx | 40 ++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'uidev/src/stories') diff --git a/uidev/src/stories/button.stories.tsx b/uidev/src/stories/button.stories.tsx index c8e9bcbf3..f7537895c 100644 --- a/uidev/src/stories/button.stories.tsx +++ b/uidev/src/stories/button.stories.tsx @@ -1,8 +1,11 @@ import { observable } from 'mobx'; import { observer } from 'mobx-react'; import React from 'react'; +import injectSheet from 'react-jss'; -import { Button } from '@meetfranz/forms'; +import { Button, Input } from '@meetfranz/forms'; +import { classes } from 'istanbul-lib-coverage'; +import { Classes } from 'jss'; import { storiesOf } from '../stores/stories'; const defaultProps = { @@ -13,6 +16,17 @@ const defaultProps = { disabled: false, }; +const styles = { + combinedElements: { + display: 'flex', + justifyContent: 'space-between', + }, + input: { + flex: 1, + marginRight: 20, + }, +}; + const createStore = (args?: any) => { return observable(Object.assign({}, defaultProps, args)); }; @@ -99,4 +113,26 @@ storiesOf('Button') e.preventDefault(); alert('Click event'); }, - })} />)); + })}/> + )) + .add('Long multi-line button', () => ( + + )) + .add('Button with Input', injectSheet(styles)(observer(({ classes }: { classes: Classes }) => ( +
+ + +
+ )), + )) + .add('Icon Button with Input', injectSheet(styles)(observer(({ classes }: { classes: Classes }) => ( +
+ + +
+ )), + )); -- cgit v1.2.3-70-g09d2