Large update for all components
reorganization, linting, updating file imports, consolidation warning: there will be errors in this commit todo: update webpack, add missing styles, scss files, consolidate the rest of components within features/*
This commit is contained in:
26
app/javascript/gabsocial/components/panel/panel_layout.js
Normal file
26
app/javascript/gabsocial/components/panel/panel_layout.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import './panel.scss';
|
||||
|
||||
export default class PanelLayout extends PureComponent {
|
||||
static propTypes = {
|
||||
title: PropTypes.string,
|
||||
icon: PropTypes.string,
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
render() {
|
||||
const {title, icon, children} = this.props;
|
||||
|
||||
return (
|
||||
<div className='panel'>
|
||||
<div className='panel-header'>
|
||||
{icon && <Icon id={icon} className='panel-header__icon' />}
|
||||
<span className='panel-header__title'>{title}</span>
|
||||
</div>
|
||||
<div className='panel__content'>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user