Initial commit
This commit is contained in:
28
src/components/UI/Box/Box.js
Normal file
28
src/components/UI/Box/Box.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import CSSModules from 'react-css-modules';
|
||||
import styles from './Box.css';
|
||||
|
||||
export default CSSModules((props) => {
|
||||
const styleList = ['Box'];
|
||||
if (props.dxDark) {
|
||||
styleList.push('Darker');
|
||||
}
|
||||
|
||||
if (props.dxSlideOut) {
|
||||
styleList.push('SlideOut');
|
||||
} else if (props.dxFadeIn) {
|
||||
styleList.push('FadeIn');
|
||||
} else if (props.dxSlideOutTop) {
|
||||
styleList.push('SlideOutTop');
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
onClick={props.clicked}
|
||||
styleName={styleList.join(' ')}
|
||||
style={{...props.dxStyle}}>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
|
||||
}, styles, {allowMultiple: true});
|
||||
Reference in New Issue
Block a user