revite/src/components/ui/Header.tsx

52 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-06-19 15:29:04 +01:00
import styled, { css } from "styled-components";
interface Props {
borders?: boolean;
2021-06-19 15:29:04 +01:00
background?: boolean;
placement: 'primary' | 'secondary'
}
export default styled.div<Props>`
2021-07-03 16:40:56 +02:00
gap: 6px;
2021-07-03 22:35:49 +01:00
height: 48px;
2021-06-19 15:29:04 +01:00
flex: 0 auto;
2021-07-03 22:35:49 +01:00
display: flex;
2021-06-19 15:29:04 +01:00
flex-shrink: 0;
2021-07-03 22:35:49 +01:00
padding: 0 16px;
font-weight: 600;
user-select: none;
align-items: center;
2021-06-19 15:29:04 +01:00
background-size: cover !important;
background-position: center !important;
2021-07-03 22:35:49 +01:00
background-color: var(--primary-header);
2021-06-19 15:29:04 +01:00
svg {
flex-shrink: 0;
}
2021-07-03 16:40:56 +02:00
/*@media only screen and (max-width: 768px) {
2021-07-02 11:39:07 +02:00
padding: 0 12px;
2021-07-03 16:40:56 +02:00
}*/
@media (pointer: coarse) {
height: 56px;
2021-07-02 11:39:07 +02:00
}
2021-06-19 15:29:04 +01:00
${ props => props.background && css`
2021-07-03 22:35:49 +01:00
height: 120px !important;
2021-06-19 15:29:04 +01:00
align-items: flex-end;
2021-07-03 22:35:49 +01:00
text-shadow: 0px 0px 1px black;
2021-06-19 15:29:04 +01:00
` }
${ props => props.placement === 'secondary' && css`
2021-06-19 20:00:30 +01:00
background-color: var(--secondary-header);
2021-06-19 15:29:04 +01:00
padding: 14px;
` }
2021-07-03 22:35:49 +01:00
${ props => props.borders && css`
2021-07-04 10:41:03 +02:00
border-start-start-radius: 8px;
` }
2021-06-19 15:29:04 +01:00
`;