diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-08-05 16:48:25 +0200 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-08-05 16:48:25 +0200 |
commit | e1e46986d902adc4c19ee009016290f9733a7d61 (patch) | |
tree | 0f44c1c9b3d0ee2d4d5fa9086d5e7ac5bbfc5772 /uidev/src/stories/icon.stories.tsx | |
parent | bump version to 5.2.1-beta.1 (diff) | |
download | ferdium-app-e1e46986d902adc4c19ee009016290f9733a7d61.tar.gz ferdium-app-e1e46986d902adc4c19ee009016290f9733a7d61.tar.zst ferdium-app-e1e46986d902adc4c19ee009016290f9733a7d61.zip |
Enable tree shaking for icons
Diffstat (limited to 'uidev/src/stories/icon.stories.tsx')
-rw-r--r-- | uidev/src/stories/icon.stories.tsx | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/uidev/src/stories/icon.stories.tsx b/uidev/src/stories/icon.stories.tsx index c8e7f8ced..f9aa1635b 100644 --- a/uidev/src/stories/icon.stories.tsx +++ b/uidev/src/stories/icon.stories.tsx | |||
@@ -1,53 +1,14 @@ | |||
1 | import { observable } from 'mobx'; | 1 | import { mdiAccountCircle } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import React from 'react'; | 2 | import React from 'react'; |
4 | import uuid from 'uuid/v4'; | ||
5 | 3 | ||
6 | import { Icon } from '@meetfranz/ui'; | 4 | import { Icon } from '@meetfranz/ui'; |
7 | import { storiesOf } from '../stores/stories'; | 5 | import { storiesOf } from '../stores/stories'; |
8 | 6 | ||
9 | // interface IStoreArgs { | ||
10 | // value?: boolean; | ||
11 | // checked?: boolean; | ||
12 | // label?: string; | ||
13 | // id?: string; | ||
14 | // name?: string; | ||
15 | // disabled?: boolean; | ||
16 | // error?: string; | ||
17 | // } | ||
18 | |||
19 | // const createStore = (args?: IStoreArgs) => { | ||
20 | // return observable(Object.assign({ | ||
21 | // id: `element-${uuid()}`, | ||
22 | // name: 'toggle', | ||
23 | // label: 'Label', | ||
24 | // value: true, | ||
25 | // checked: false, | ||
26 | // disabled: false, | ||
27 | // error: '', | ||
28 | // }, args)); | ||
29 | // }; | ||
30 | |||
31 | // const WithStoreToggle = observer(({ store }: { store: any }) => ( | ||
32 | // <> | ||
33 | // <Toggle | ||
34 | // value={store.value} | ||
35 | // checked={store.checked} | ||
36 | // label={store.label} | ||
37 | // id={store.id} | ||
38 | // name={store.name} | ||
39 | // disabled={store.disabled} | ||
40 | // error={store.error} | ||
41 | // onChange={() => store.checked = !store.checked} | ||
42 | // /> | ||
43 | // </> | ||
44 | // )); | ||
45 | |||
46 | storiesOf('Icon') | 7 | storiesOf('Icon') |
47 | .add('Basic', () => ( | 8 | .add('Basic', () => ( |
48 | <> | 9 | <> |
49 | <Icon icon="mdiAccountCircle" /> | 10 | <Icon icon={mdiAccountCircle} /> |
50 | <Icon icon="mdiAccountCircle" size={2} /> | 11 | <Icon icon={mdiAccountCircle} size={2} /> |
51 | <Icon icon="mdiAccountCircle" size={3} /> | 12 | <Icon icon={mdiAccountCircle} size={3} /> |
52 | </> | 13 | </> |
53 | )); | 14 | )); |