revite/src/components/ui/Header.tsx

51 lines
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>`
display: flex;
2021-07-03 10:40:56 -04:00
height: 48px;
font-weight: 600;
align-items: center;
2021-07-03 10:40:56 -04:00
user-select: none;
gap: 6px;
2021-06-19 10:29:04 -04:00
flex: 0 auto;
2021-07-03 10:40:56 -04:00
padding: 0 16px;
2021-06-19 10:29:04 -04:00
flex-shrink: 0;
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-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`
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`
2021-07-03 10:40:56 -04:00
/*border-start-start-radius: 8px;*/
` }
2021-06-19 10:29:04 -04:00
`;