UNPKG

@chayns-components/core

Version:

A set of beautiful React components for developing your own applications with chayns.

81 lines (74 loc) 2.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledMotionMentionFinderPopup = exports.StyledMentionFinder = void 0; var _react = require("motion/react"); var _styledComponents = _interopRequireWildcard(require("styled-components")); var _mentionFinder = require("../../constants/mentionFinder"); 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 StyledMentionFinder = exports.StyledMentionFinder = _styledComponents.default.div` position: relative; `; const StyledMotionMentionFinderPopup = exports.StyledMotionMentionFinderPopup = (0, _styledComponents.default)(_react.motion.div)` background-color: ${({ theme }) => theme['000']}; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 3px; box-shadow: 1px 3px 8px rgba(0, 0, 0, 0.1); left: 0; max-height: 275px; overflow-y: scroll; position: absolute; width: 100%; ${({ $popupAlignment }) => { switch ($popupAlignment) { case _mentionFinder.MentionFinderPopupAlignment.Bottom: return (0, _styledComponents.css)` top: 0; `; case _mentionFinder.MentionFinderPopupAlignment.Top: return (0, _styledComponents.css)` bottom: 0; `; default: return undefined; } }} // Styles for custom scrollbar &::-webkit-scrollbar { width: 5px; } &::-webkit-scrollbar-track { background-color: transparent; } &::-webkit-scrollbar-button { background-color: transparent; height: 5px; } &::-webkit-scrollbar-thumb { background-color: rgba( ${({ theme }) => theme['text-rgb']}, 0.15 ); border-radius: 20px; } // Scrollbar styles for Firefox. The above styles are not supported in Firefox, these styles are // only supported in Firefox: * { scrollbar-color: rgba( ${({ theme }) => theme['text-rgb']}, 0.15 ) transparent; scrollbar-width: thin; } `; //# sourceMappingURL=MentionFinder.styles.js.map