revite/src/components/ui/Header.tsx

52 lines
1.1 KiB
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>`
2021-07-03 10:40:56 -04:00
gap: 6px;
2021-07-03 17:35:49 -04:00
height: 48px;
2021-06-19 10:29:04 -04:00
flex: 0 auto;
2021-07-03 17:35:49 -04:00
display: flex;
2021-06-19 10:29:04 -04:00
flex-shrink: 0;
2021-07-03 17:35:49 -04:00
padding: 0 16px;
font-weight: 600;
user-select: none;
align-items: center;
2021-06-19 10:29:04 -04:00
background-size: cover !important;
background-position: center !important;
2021-07-03 17:35:49 -04:00
background-color: var(--primary-header);
2021-06-19 10:29:04 -04:00
svg {
flex-shrink: 0;
}
2021-07-03 10:40:56 -04:00
/*@media only screen and (max-width: 768px) {
2021-07-02 05:39:07 -04:00
padding: 0 12px;
2021-07-03 10:40:56 -04:00
}*/
@media (pointer: coarse) {
height: 56px;
2021-07-02 05:39:07 -04:00
}
2021-06-19 10:29:04 -04:00
${ props => props.background && css`
2021-07-03 17:35:49 -04:00
height: 120px !important;
2021-06-19 10:29:04 -04:00
align-items: flex-end;
2021-07-03 17:35:49 -04:00
text-shadow: 0px 0px 1px black;
2021-06-19 10:29:04 -04:00
` }
${ 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;
` }
2021-07-03 17:35:49 -04:00
${ props => props.borders && css`
2021-07-04 04:41:03 -04:00
border-start-start-radius: 8px;
` }
2021-06-19 10:29:04 -04:00
`;