2021-02-04 10:28:48 +00:00
|
|
|
import styled from "styled-components";
|
2021-02-25 21:19:45 +00:00
|
|
|
import Base from "../themes/base";
|
2021-02-04 10:28:48 +00:00
|
|
|
|
|
|
|
const StyledComboBox = styled.div`
|
|
|
|
width: ${(props) =>
|
|
|
|
(props.scaled && "100%") ||
|
|
|
|
(props.size === "base" && props.theme.comboBox.width.base) ||
|
|
|
|
(props.size === "middle" && props.theme.comboBox.width.middle) ||
|
|
|
|
(props.size === "big" && props.theme.comboBox.width.big) ||
|
|
|
|
(props.size === "huge" && props.theme.comboBox.width.huge) ||
|
|
|
|
(props.size === "content" && "fit-content")};
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
outline: 0;
|
|
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
|
|
|
|
|
|
.dropdown-container {
|
|
|
|
padding: ${(props) =>
|
|
|
|
props.advancedOptions && props.theme.comboBox.padding};
|
2022-05-20 12:25:40 +00:00
|
|
|
|
|
|
|
@media (max-width: 428px) {
|
|
|
|
position: fixed;
|
|
|
|
top: unset;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
width: -moz-available;
|
|
|
|
width: -webkit-fill-available;
|
|
|
|
width: fill-available;
|
|
|
|
border: none;
|
|
|
|
border-radius: 6px 6px 0px 0px;
|
|
|
|
}
|
2021-02-04 10:28:48 +00:00
|
|
|
}
|
2021-09-14 09:28:13 +00:00
|
|
|
-webkit-user-select: none;
|
2022-05-20 12:25:40 +00:00
|
|
|
|
|
|
|
.backdrop-active {
|
|
|
|
z-index: 210;
|
|
|
|
}
|
2021-02-04 10:28:48 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
StyledComboBox.defaultProps = {
|
|
|
|
theme: Base,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default StyledComboBox;
|