2021-07-04 10:53:06 -04:00
|
|
|
import styled, { css } from "styled-components";
|
2021-07-04 04:52:34 -04:00
|
|
|
|
2021-07-04 10:53:06 -04:00
|
|
|
export default styled.details<{ sticky?: boolean, large?: boolean }>`
|
2021-07-04 04:52:34 -04:00
|
|
|
summary {
|
2021-07-04 10:53:06 -04:00
|
|
|
${ props => props.sticky && css`
|
|
|
|
top: -1px;
|
|
|
|
z-index: 10;
|
|
|
|
position: sticky;
|
|
|
|
` }
|
|
|
|
|
|
|
|
${ props => props.large && css`
|
|
|
|
padding: 5px 0;
|
|
|
|
` }
|
|
|
|
|
2021-07-04 04:52:34 -04:00
|
|
|
outline: none;
|
2021-07-04 10:53:06 -04:00
|
|
|
display: flex;
|
|
|
|
cursor: pointer;
|
2021-07-04 04:52:34 -04:00
|
|
|
list-style: none;
|
2021-07-04 10:53:06 -04:00
|
|
|
align-items: center;
|
2021-07-04 04:52:34 -04:00
|
|
|
transition: .2s opacity;
|
|
|
|
|
|
|
|
&::marker, &::-webkit-details-marker {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2021-07-04 10:53:06 -04:00
|
|
|
> svg {
|
2021-07-04 04:52:34 -04:00
|
|
|
flex-shrink: 0;
|
|
|
|
transition: .2s ease transform;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not([open]) {
|
|
|
|
summary {
|
|
|
|
opacity: .7;
|
|
|
|
}
|
|
|
|
|
|
|
|
summary svg {
|
|
|
|
transform: rotateZ(-90deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|