PromucFlow_constructor/app/client/src/pages/UserAuth/StyledComponents.tsx

103 lines
2.4 KiB
TypeScript
Raw Normal View History

2019-12-16 08:49:10 +00:00
import styled, { css } from "styled-components";
import { Link } from "react-router-dom";
import Form from "components/editorComponents/Form";
import { Card } from "@blueprintjs/core";
export const AuthContainer = styled.section`
2020-01-28 11:46:04 +00:00
position: absolute;
width: 100%;
2019-12-16 08:49:10 +00:00
height: 100vh;
2020-01-28 11:46:04 +00:00
will-change: transform, opacity;
2019-12-16 08:49:10 +00:00
`;
export const AuthCard = styled(Card)`
&& {
2020-12-24 04:32:25 +00:00
width: ${(props) => props.theme.authCard.width}px;
background: ${(props) => props.theme.authCard.background};
border-radius: ${(props) => props.theme.authCard.borderRadius}px;
padding: ${(props) => props.theme.authCard.padding}px;
box-shadow: ${(props) => props.theme.authCard.shadow};
border: none;
& h1,
h5 {
padding: 0;
margin: 0;
2020-12-24 04:32:25 +00:00
font-weight: ${(props) => props.theme.fontWeights[1]};
}
2019-12-16 08:49:10 +00:00
}
`;
export const AuthCardContainer = styled.div``;
export const AuthCardHeader = styled.header`
& {
h1 {
2020-12-24 04:32:25 +00:00
font-size: ${(props) => props.theme.fontSizes[6]}px;
2019-12-16 08:49:10 +00:00
}
h5 {
2020-12-24 04:32:25 +00:00
font-size: ${(props) => props.theme.fontSizes[4]}px;
2019-12-16 08:49:10 +00:00
}
2020-12-24 04:32:25 +00:00
margin-bottom: ${(props) => props.theme.authCard.dividerSpacing}px;
2019-12-16 08:49:10 +00:00
}
`;
export const AuthCardNavLink = styled(Link)`
text-align: center;
margin: 0 auto;
display: block;
2020-12-24 04:32:25 +00:00
margin-top: ${(props) => props.theme.spaces[12]}px;
2019-12-16 08:49:10 +00:00
& span {
2020-12-24 04:32:25 +00:00
margin-left: ${(props) => props.theme.spaces[4]}px;
2019-12-16 08:49:10 +00:00
}
`;
export const AuthCardFooter = styled.footer`
display: flex;
width: 100%;
justify-content: space-evenly;
align-items: baseline;
2020-12-24 04:32:25 +00:00
margin-top: ${(props) => props.theme.authCard.dividerSpacing}px;
2019-12-16 08:49:10 +00:00
`;
export const AuthCardBody = styled.div`
display: flex;
justify-content: flex-start;
align-items: stretch;
& a {
2020-12-24 04:32:25 +00:00
margin-top: ${(props) => props.theme.spaces[8]}px;
font-size: ${(props) => props.theme.fontSizes[2]}px;
2019-12-16 08:49:10 +00:00
}
`;
const formSpacing = css`
flex-grow: 1;
2020-12-24 04:32:25 +00:00
margin-right: ${(props) => props.theme.authCard.dividerSpacing}px;
2019-12-16 08:49:10 +00:00
`;
export const SpacedForm = styled(Form)`
${formSpacing}
`;
export const SpacedSubmitForm = styled.form`
${formSpacing}
2020-02-24 09:35:11 +00:00
& a {
2020-12-24 04:32:25 +00:00
font-size: ${(props) => props.theme.fontSizes[3]}px;
2020-02-24 09:35:11 +00:00
}
&:only-child {
margin-right: 0;
}
2019-12-16 08:49:10 +00:00
`;
export const FormActions = styled.div`
display: flex;
2020-02-24 09:35:11 +00:00
& button {
flex: 1;
}
2019-12-16 08:49:10 +00:00
justify-content: space-between;
align-items: baseline;
2020-12-24 04:32:25 +00:00
margin-top: ${(props) => props.theme.spaces[2]}px;
2019-12-16 08:49:10 +00:00
& > label {
2020-12-24 04:32:25 +00:00
margin-right: ${(props) => props.theme.spaces[11]}px;
2019-12-16 08:49:10 +00:00
}
`;