@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
56 lines (51 loc) • 2.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledDropdownBodyWrapperContent = exports.StyledDropdownBodyWrapper = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _dropdown = require("../../types/dropdown");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const StyledDropdownBodyWrapper = exports.StyledDropdownBodyWrapper = _styledComponents.default.div``;
const StyledDropdownBodyWrapperContent = exports.StyledDropdownBodyWrapperContent = _styledComponents.default.div`
width: ${({
$width
}) => $width}px;
min-width: ${({
$minWidth
}) => $minWidth}px;
overflow: hidden;
${({
$maxHeight
}) => typeof $maxHeight === 'number' && (0, _styledComponents.css)`
max-height: ${$maxHeight}px;
overflow-y: auto;
overflow-x: hidden;
`}
// Basic styles
background: ${({
theme
}) => theme['000']};
border: 1px solid rgba(160, 160, 160, 0.3);
box-shadow: 0 0 0 1px
rgba(${({
theme
}) => theme['009-rgb']}, 0.08) inset;
${({
$direction
}) => {
if ([_dropdown.DropdownDirection.BOTTOM, _dropdown.DropdownDirection.BOTTOM_LEFT, _dropdown.DropdownDirection.BOTTOM_RIGHT].includes($direction)) {
return (0, _styledComponents.css)`
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.2);
`;
}
return (0, _styledComponents.css)`
border-top-left-radius: 3px;
border-top-right-radius: 3px;
box-shadow: 0 -3px 10px 0 rgba(0, 0, 0, 0.2);
`;
}}
`;
//# sourceMappingURL=DropdownBodyWrapper.styles.js.map