2021-11-11 03:10:35 +08:00
|
|
|
import styled from 'styled-components';
|
|
|
|
import Styled from '../base/styles';
|
|
|
|
import Button from '/imports/ui/components/button/component';
|
|
|
|
import { borderSize } from '/imports/ui/stylesheets/styled-components/general';
|
|
|
|
import {
|
|
|
|
lineHeightComputed,
|
|
|
|
fontSizeLarge,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/typography';
|
|
|
|
import {
|
|
|
|
colorWhite,
|
|
|
|
colorGrayLighter,
|
|
|
|
colorText,
|
|
|
|
} from '/imports/ui/stylesheets/styled-components/palette';
|
|
|
|
|
|
|
|
const SimpleModal = styled(Styled.BaseModal)`
|
|
|
|
outline: transparent;
|
|
|
|
outline-width: ${borderSize};
|
|
|
|
outline-style: solid;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
padding: calc(${lineHeightComputed} / 2) ${lineHeightComputed};
|
|
|
|
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
|
|
|
|
background-color: ${colorWhite} !important;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Header = styled.header`
|
|
|
|
display: flex;
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
${({ hideBorder }) => !hideBorder && `
|
|
|
|
padding: calc(${lineHeightComputed} / 2) 0;
|
|
|
|
border-bottom: ${borderSize} solid ${colorGrayLighter};
|
|
|
|
`}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Title = styled.h1`
|
|
|
|
min-width: 0;
|
|
|
|
display: inline-block;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
flex: 1;
|
|
|
|
margin: 0;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: ${fontSizeLarge};
|
|
|
|
text-align: center;
|
|
|
|
align-self: flex-end;
|
2021-11-23 03:59:32 +08:00
|
|
|
|
|
|
|
${({ hasLeftMargin }) => hasLeftMargin && `
|
|
|
|
margin-left: 35px;
|
|
|
|
`}
|
2021-11-11 03:10:35 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
const DismissButton = styled(Button)`
|
|
|
|
flex: 0;
|
|
|
|
& > span:first-child {
|
|
|
|
border-color: transparent;
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
& > i { color: ${colorText}; }
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Content = styled.div`
|
|
|
|
overflow: auto;
|
|
|
|
color: ${colorText};
|
|
|
|
font-weight: normal;
|
2021-10-19 04:52:59 +08:00
|
|
|
padding: 0;
|
2021-11-11 03:10:35 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
export default {
|
|
|
|
SimpleModal,
|
|
|
|
Header,
|
|
|
|
Title,
|
|
|
|
DismissButton,
|
|
|
|
Content,
|
|
|
|
};
|