revite/src/components/ui/Header.tsx

47 lines
961 B
TypeScript
Raw Normal View History

2021-06-19 10:29:04 -04:00
import styled, { css } from "styled-components";
interface Props {
borders?: boolean;
2021-06-19 10:29:04 -04:00
background?: boolean;
placement: 'primary' | 'secondary'
}
export default styled.div<Props>`
height: 56px;
font-weight: 600;
user-select: none;
display: flex;
align-items: center;
2021-06-19 10:29:04 -04:00
gap: 10px;
flex: 0 auto;
display: flex;
padding: 0 20px;
2021-06-19 10:29:04 -04:00
flex-shrink: 0;
align-items: center;
2021-06-19 15:00:30 -04:00
background-color: var(--primary-header);
2021-06-19 10:29:04 -04:00
background-size: cover !important;
background-position: center !important;
svg {
flex-shrink: 0;
}
2021-06-19 10:29:04 -04:00
${ props => props.background && css`
height: 120px;
align-items: flex-end;
` }
${ props => props.placement === 'secondary' && css`
2021-06-19 15:00:30 -04:00
background-color: var(--secondary-header);
2021-06-19 10:29:04 -04:00
padding: 14px;
` }
${ props => props.borders && css`
border-start-start-radius: 8px;
border-end-start-radius: 8px;
` }
2021-06-19 10:29:04 -04:00
`;