diff options
Diffstat (limited to 'packages/forms/src/wrapper/index.tsx')
-rw-r--r-- | packages/forms/src/wrapper/index.tsx | 15 |
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 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import React, { Component } from 'react'; | 2 | import React, { Component } from 'react'; |
4 | import injectStyle from 'react-jss'; | 3 | import injectStyle from 'react-jss'; |
5 | import { IWithStyle } from '../typings/generic'; | 4 | import { IWithStyle } from '../typings/generic'; |
@@ -9,22 +8,26 @@ import styles from './styles'; | |||
9 | interface IProps extends IWithStyle { | 8 | interface 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 | ||
15 | class WrapperComponent extends Component<IProps> { | 14 | class 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 | ); |