2020-07-02 11:24:14 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as Constants from "~/common/constants";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-07-02 11:24:14 +03:00
|
|
|
import { css } from "@emotion/react";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
|
|
|
const STYLES_GROUP_CONTAINER = css`
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
|
|
|
border: 1px solid ${Constants.system.border};
|
|
|
|
border-radius: 4px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_TITLE = css`
|
|
|
|
font-size: ${Constants.typescale.lvl2};
|
|
|
|
width: 100%;
|
|
|
|
margin-top: 8px;
|
2020-07-02 11:24:14 +03:00
|
|
|
font-family: ${Constants.font.semiBold};
|
2020-04-09 00:29:13 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_HEADER = css`
|
|
|
|
background: ${Constants.system.gray};
|
2020-07-27 04:53:50 +03:00
|
|
|
padding: 24px 20px 24px 18px;
|
2020-04-09 00:29:13 +03:00
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const STYLES_GROUP = css`
|
|
|
|
background: ${Constants.system.white};
|
|
|
|
width: 100%;
|
2020-06-22 14:00:51 +03:00
|
|
|
padding: 0;
|
2020-04-09 00:29:13 +03:00
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default (props) => {
|
|
|
|
return (
|
|
|
|
<div css={STYLES_GROUP_CONTAINER} style={props.style} id={props.id}>
|
|
|
|
<header css={STYLES_HEADER}>
|
|
|
|
<div css={STYLES_TITLE}>{props.title}</div>
|
|
|
|
</header>
|
|
|
|
<div css={STYLES_GROUP} style={props.groupStyle}>
|
|
|
|
{props.children}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|