diff options
author | 2019-02-06 20:28:15 +0100 | |
---|---|---|
committer | 2019-02-06 20:28:15 +0100 | |
commit | 14b151cad6a5a849bb476aaa3fc53bf1eead7f4b (patch) | |
tree | 8daa38d28fe21e1745093962526dd36744be4274 /packages/ui | |
parent | update versions (diff) | |
download | ferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.tar.gz ferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.tar.zst ferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.zip |
cleanup
Diffstat (limited to 'packages/ui')
-rw-r--r-- | packages/ui/package.json | 9 | ||||
-rw-r--r-- | packages/ui/src/badge/index.tsx | 1 | ||||
-rw-r--r-- | packages/ui/src/headline/index.tsx | 2 | ||||
-rw-r--r-- | packages/ui/src/infobox/index.tsx | 4 | ||||
-rw-r--r-- | packages/ui/src/loader/index.tsx | 11 | ||||
-rw-r--r-- | packages/ui/webpack.config.js | 19 |
6 files changed, 13 insertions, 33 deletions
diff --git a/packages/ui/package.json b/packages/ui/package.json index cd7252850..387f8de50 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json | |||
@@ -1,11 +1,11 @@ | |||
1 | { | 1 | { |
2 | "name": "@meetfranz/ui", | 2 | "name": "@meetfranz/ui", |
3 | "version": "0.0.0", | 3 | "version": "0.0.1", |
4 | "description": "React UI components for Franz", | 4 | "description": "React UI components for Franz", |
5 | "main": "lib/index.js", | 5 | "main": "lib/index.js", |
6 | "scripts": { | 6 | "scripts": { |
7 | "dev": "NODE_ENV=development ../../node_modules/.bin/webpack -w", | 7 | "dev": "tsc -w", |
8 | "prepare": "../../node_modules/.bin/webpack" | 8 | "prepare": "tsc" |
9 | }, | 9 | }, |
10 | "publishConfig": { | 10 | "publishConfig": { |
11 | "access": "public" | 11 | "access": "public" |
@@ -30,9 +30,6 @@ | |||
30 | }, | 30 | }, |
31 | "peerDependencies": { | 31 | "peerDependencies": { |
32 | "classnames": "^2.2.6", | 32 | "classnames": "^2.2.6", |
33 | "lodash": "^4.17.11", | ||
34 | "mobx": "^5.8.0", | ||
35 | "mobx-react": "^5.4.3", | ||
36 | "react": "^16.7.0", | 33 | "react": "^16.7.0", |
37 | "react-dom": "16.7.0", | 34 | "react-dom": "16.7.0", |
38 | "react-jss": "^8.6.1" | 35 | "react-jss": "^8.6.1" |
diff --git a/packages/ui/src/badge/index.tsx b/packages/ui/src/badge/index.tsx index 241e778e7..fc52ecc73 100644 --- a/packages/ui/src/badge/index.tsx +++ b/packages/ui/src/badge/index.tsx | |||
@@ -65,6 +65,7 @@ class BadgeComponent extends Component<IProps> { | |||
65 | [classes[type]]: true, | 65 | [classes[type]]: true, |
66 | [`${className}`]: className, | 66 | [`${className}`]: className, |
67 | })} | 67 | })} |
68 | data-type="franz-badge" | ||
68 | > | 69 | > |
69 | {children} | 70 | {children} |
70 | </div> | 71 | </div> |
diff --git a/packages/ui/src/headline/index.tsx b/packages/ui/src/headline/index.tsx index 3458a40ad..7eabfcf80 100644 --- a/packages/ui/src/headline/index.tsx +++ b/packages/ui/src/headline/index.tsx | |||
@@ -3,7 +3,6 @@ import classnames from 'classnames'; | |||
3 | import React, { Component } from 'react'; | 3 | import React, { Component } from 'react'; |
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle from 'react-jss'; |
5 | 5 | ||
6 | import { uiFontSize } from '@meetfranz/theme/lib/themes/default'; | ||
7 | import { IWithStyle, Omit } from '../typings/generic'; | 6 | import { IWithStyle, Omit } from '../typings/generic'; |
8 | 7 | ||
9 | interface IProps extends IWithStyle { | 8 | interface IProps extends IWithStyle { |
@@ -55,6 +54,7 @@ class HeadlineComponent extends Component<IProps> { | |||
55 | [classes[level ? `h${level}` : 'h1']]: true, | 54 | [classes[level ? `h${level}` : 'h1']]: true, |
56 | [`${className}`]: className, | 55 | [`${className}`]: className, |
57 | }), | 56 | }), |
57 | 'data-type': 'franz-headline', | ||
58 | }, | 58 | }, |
59 | children, | 59 | children, |
60 | ); | 60 | ); |
diff --git a/packages/ui/src/infobox/index.tsx b/packages/ui/src/infobox/index.tsx index bf985ea9c..53ed16341 100644 --- a/packages/ui/src/infobox/index.tsx +++ b/packages/ui/src/infobox/index.tsx | |||
@@ -1,9 +1,7 @@ | |||
1 | import { Theme } from '@meetfranz/theme'; | 1 | import { Theme } from '@meetfranz/theme'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import React, { Component } from 'react'; | 3 | import React, { Component } from 'react'; |
5 | import injectStyle from 'react-jss'; | 4 | import injectStyle from 'react-jss'; |
6 | // import Loader from 'react-loader'; | ||
7 | 5 | ||
8 | import { Icon } from '../'; | 6 | import { Icon } from '../'; |
9 | import { IWithStyle } from '../typings/generic'; | 7 | import { IWithStyle } from '../typings/generic'; |
@@ -95,7 +93,6 @@ const styles = (theme: Theme) => ({ | |||
95 | ...buttonStyles(theme), | 93 | ...buttonStyles(theme), |
96 | }); | 94 | }); |
97 | 95 | ||
98 | @observer | ||
99 | class InfoboxComponent extends Component<IProps, IState> { | 96 | class InfoboxComponent extends Component<IProps, IState> { |
100 | public static defaultProps = { | 97 | public static defaultProps = { |
101 | type: 'primary', | 98 | type: 'primary', |
@@ -160,6 +157,7 @@ class InfoboxComponent extends Component<IProps, IState> { | |||
160 | [classes[`${type}`]]: type, | 157 | [classes[`${type}`]]: type, |
161 | [classes.dismissing]: isDismissing, | 158 | [classes.dismissing]: isDismissing, |
162 | })} | 159 | })} |
160 | data-type="franz-infobox" | ||
163 | > | 161 | > |
164 | {icon && ( | 162 | {icon && ( |
165 | <Icon icon={icon} className={classes.icon} /> | 163 | <Icon icon={icon} className={classes.icon} /> |
diff --git a/packages/ui/src/loader/index.tsx b/packages/ui/src/loader/index.tsx index 799caf195..de5ba5237 100644 --- a/packages/ui/src/loader/index.tsx +++ b/packages/ui/src/loader/index.tsx | |||
@@ -26,10 +26,13 @@ class LoaderComponent extends Component<IProps> { | |||
26 | } = this.props; | 26 | } = this.props; |
27 | 27 | ||
28 | return ( | 28 | return ( |
29 | <div className={classnames({ | 29 | <div |
30 | [classes.container]: true, | 30 | className={classnames({ |
31 | [`${className}`]: className, | 31 | [classes.container]: true, |
32 | })}> | 32 | [`${className}`]: className, |
33 | })} | ||
34 | data-type="franz-loader" | ||
35 | > | ||
33 | <ReactLoader | 36 | <ReactLoader |
34 | loaded={false} | 37 | loaded={false} |
35 | width={4} | 38 | width={4} |
diff --git a/packages/ui/webpack.config.js b/packages/ui/webpack.config.js deleted file mode 100644 index cc3370359..000000000 --- a/packages/ui/webpack.config.js +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | const path = require('path'); | ||
2 | const baseConfig = require('../../webpack.config.base')(__dirname); | ||
3 | |||
4 | module.exports = Object.assign({}, baseConfig, { | ||
5 | output: { | ||
6 | filename: 'index.js', | ||
7 | path: path.join(__dirname, 'lib'), | ||
8 | libraryTarget: 'commonjs2', | ||
9 | }, | ||
10 | externals: { | ||
11 | react: 'react', | ||
12 | reactDom: 'react-dom', | ||
13 | classnames: 'classnames', | ||
14 | lodash: 'lodash', | ||
15 | mobx: 'mobx', | ||
16 | mobxReact: 'mobx-react', | ||
17 | reactJss: 'react-jss', | ||
18 | }, | ||
19 | }); | ||