summaryrefslogtreecommitdiffstats
path: root/packages/forms/src/wrapper/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/forms/src/wrapper/index.tsx')
-rw-r--r--packages/forms/src/wrapper/index.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/forms/src/wrapper/index.tsx b/packages/forms/src/wrapper/index.tsx
index 633cc4c99..87e2c6513 100644
--- a/packages/forms/src/wrapper/index.tsx
+++ b/packages/forms/src/wrapper/index.tsx
@@ -1,3 +1,4 @@
1import classnames from 'classnames';
1import { observer } from 'mobx-react'; 2import { observer } from 'mobx-react';
2import React, { Component } from 'react'; 3import React, { Component } from 'react';
3import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
@@ -7,22 +8,27 @@ import styles from './styles';
7 8
8interface IProps extends IWithStyle { 9interface IProps extends IWithStyle {
9 children: React.ReactNode; 10 children: React.ReactNode;
11 className?: string;
10} 12}
11 13
12@observer 14@observer
13class Wrapper extends Component<IProps> { 15class WrapperComponent extends Component<IProps> {
14 render() { 16 render() {
15 const { 17 const {
16 children, 18 children,
17 classes, 19 classes,
20 className,
18 } = this.props; 21 } = this.props;
19 22
20 return ( 23 return (
21 <div className={classes.container}> 24 <div className={classnames({
25 [`${classes.container}`]: true,
26 [`${className}`]: className,
27 })}>
22 {children} 28 {children}
23 </div> 29 </div>
24 ); 30 );
25 } 31 }
26} 32}
27 33
28export default injectStyle(styles)(Wrapper); 34export const Wrapper = injectStyle(styles)(WrapperComponent);