mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-03 12:10:45 +05:30
48 lines
807 B
React
48 lines
807 B
React
|
import React from 'react';
|
||
|
|
||
|
import styles from './panel.scss';
|
||
|
|
||
|
export function Panel(props) {
|
||
|
var { title } = props;
|
||
|
|
||
|
if (title) {
|
||
|
title = (
|
||
|
<PanelHeader>
|
||
|
{title}
|
||
|
</PanelHeader>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<div className={styles.panel}>
|
||
|
{title}
|
||
|
|
||
|
{props.children}
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export function PanelHeader(props) {
|
||
|
return (
|
||
|
<div className={styles.header}>
|
||
|
{props.children}
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export function PanelBody(props) {
|
||
|
return (
|
||
|
<div className={styles.body}>
|
||
|
{props.children}
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export function PanelFooter(props) {
|
||
|
return (
|
||
|
<div className={styles.footer}>
|
||
|
{props.children}
|
||
|
</div>
|
||
|
);
|
||
|
}
|