UNPKG

@confi/conflux-react-ui-test-package

Version:

Modern and minimalist React UI library.

36 lines (32 loc) 1.67 kB
import _JSXStyle from "styled-jsx/style"; import React from 'react'; import useTheme from '../styles/use-theme'; import withDefaults from '../utils/with-defaults'; import { useSelectContext } from './select-context'; import Dropdown from '../shared/dropdown'; var defaultProps = { className: '', dropdownStyle: {} }; var SelectDropdown = function SelectDropdown(_ref) { var visible = _ref.visible, children = _ref.children, className = _ref.className, dropdownStyle = _ref.dropdownStyle, disableMatchWidth = _ref.disableMatchWidth; var theme = useTheme(); var _useSelectContext = useSelectContext(), ref = _useSelectContext.ref; return /*#__PURE__*/React.createElement(Dropdown, { parent: ref, visible: visible, disableMatchWidth: disableMatchWidth }, /*#__PURE__*/React.createElement("div", { style: dropdownStyle, className: _JSXStyle.dynamic([["1429526595", [theme.layout.radius, theme.expressiveness.shadowLarge, theme.palette.background, theme.layout.gapQuarter]]]) + " " + "select-dropdown ".concat(className) }, children, /*#__PURE__*/React.createElement(_JSXStyle, { id: "1429526595", dynamic: [theme.layout.radius, theme.expressiveness.shadowLarge, theme.palette.background, theme.layout.gapQuarter] }, ".select-dropdown.__jsx-style-dynamic-selector{border-radius:".concat(theme.layout.radius, ";box-shadow:").concat(theme.expressiveness.shadowLarge, ";background-color:").concat(theme.palette.background, ";max-height:15rem;overflow-y:auto;overflow-anchor:none;padding:").concat(theme.layout.gapQuarter, " 0;}")))); }; export default withDefaults(SelectDropdown, defaultProps);