aboutsummaryrefslogtreecommitdiffstats
path: root/packages/forms/src/wrapper
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-02-06 20:28:15 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-02-06 20:28:15 +0100
commit14b151cad6a5a849bb476aaa3fc53bf1eead7f4b (patch)
tree8daa38d28fe21e1745093962526dd36744be4274 /packages/forms/src/wrapper
parentupdate versions (diff)
downloadferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.tar.gz
ferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.tar.zst
ferdium-app-14b151cad6a5a849bb476aaa3fc53bf1eead7f4b.zip
cleanup
Diffstat (limited to 'packages/forms/src/wrapper')
-rw-r--r--packages/forms/src/wrapper/index.tsx15
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/forms/src/wrapper/index.tsx b/packages/forms/src/wrapper/index.tsx
index 87e2c6513..d9c61381d 100644
--- a/packages/forms/src/wrapper/index.tsx
+++ b/packages/forms/src/wrapper/index.tsx
@@ -1,5 +1,4 @@
1import classnames from 'classnames'; 1import classnames from 'classnames';
2import { observer } from 'mobx-react';
3import React, { Component } from 'react'; 2import React, { Component } from 'react';
4import injectStyle from 'react-jss'; 3import injectStyle from 'react-jss';
5import { IWithStyle } from '../typings/generic'; 4import { IWithStyle } from '../typings/generic';
@@ -9,22 +8,26 @@ import styles from './styles';
9interface IProps extends IWithStyle { 8interface IProps extends IWithStyle {
10 children: React.ReactNode; 9 children: React.ReactNode;
11 className?: string; 10 className?: string;
11 identifier: string;
12} 12}
13 13
14@observer
15class WrapperComponent extends Component<IProps> { 14class WrapperComponent extends Component<IProps> {
16 render() { 15 render() {
17 const { 16 const {
18 children, 17 children,
19 classes, 18 classes,
20 className, 19 className,
20 identifier,
21 } = this.props; 21 } = this.props;
22 22
23 return ( 23 return (
24 <div className={classnames({ 24 <div
25 [`${classes.container}`]: true, 25 className={classnames({
26 [`${className}`]: className, 26 [`${classes.container}`]: true,
27 })}> 27 [`${className}`]: className,
28 })}
29 data-type={identifier}
30 >
28 {children} 31 {children}
29 </div> 32 </div>
30 ); 33 );