mirror of
https://github.com/zoriya/flood.git
synced 2025-12-20 06:05:15 +00:00
Organize filestructure
This commit is contained in:
29
client/source/scripts/components/layout/ApplicationPanel.js
Normal file
29
client/source/scripts/components/layout/ApplicationPanel.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import classnames from 'classnames';
|
||||
import React from 'react';
|
||||
|
||||
class ApplicationContent extends React.Component {
|
||||
render() {
|
||||
let classes = classnames(this.props.baseClassName, {
|
||||
[`${this.props.baseClassName}--${this.props.modifier}`]: this.props.baseClassName,
|
||||
[this.props.extension]: this.props.extension
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={classes}>
|
||||
{this.props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
ApplicationContent.defaultProps = {
|
||||
baseClassName: 'application__panel'
|
||||
};
|
||||
|
||||
ApplicationContent.propTypes = {
|
||||
children: React.PropTypes.node,
|
||||
extension: React.PropTypes.string,
|
||||
modifier: React.PropTypes.string
|
||||
};
|
||||
|
||||
export default ApplicationContent;
|
||||
Reference in New Issue
Block a user