diff options
Diffstat (limited to 'packages/forms/src/wrapper')
-rw-r--r-- | packages/forms/src/wrapper/index.tsx | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/packages/forms/src/wrapper/index.tsx b/packages/forms/src/wrapper/index.tsx deleted file mode 100644 index ffcd6fe0b..000000000 --- a/packages/forms/src/wrapper/index.tsx +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { Component, ReactNode } from 'react'; | ||
3 | import injectStyle from 'react-jss'; | ||
4 | import { IWithStyle } from '../typings/generic'; | ||
5 | |||
6 | interface IProps extends IWithStyle { | ||
7 | children: ReactNode; | ||
8 | className?: string; | ||
9 | identifier: string; | ||
10 | noMargin?: boolean; | ||
11 | } | ||
12 | |||
13 | const styles = { | ||
14 | container: { | ||
15 | marginBottom: (props: IProps) => (props.noMargin ? 0 : 20), | ||
16 | }, | ||
17 | }; | ||
18 | |||
19 | class WrapperComponent extends Component<IProps> { | ||
20 | render() { | ||
21 | const { children, classes, className, identifier } = this.props; | ||
22 | |||
23 | return ( | ||
24 | <div | ||
25 | className={classnames({ | ||
26 | [`${classes.container}`]: true, | ||
27 | [`${className}`]: className, | ||
28 | })} | ||
29 | data-type={identifier} | ||
30 | > | ||
31 | {children} | ||
32 | </div> | ||
33 | ); | ||
34 | } | ||
35 | } | ||
36 | |||
37 | export const Wrapper = injectStyle(styles)(WrapperComponent); | ||