@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
84 lines (78 loc) • 1.86 kB
JavaScript
import { motion } from 'motion/react';
import styled, { css } from 'styled-components';
import { MentionFinderPopupAlignment } from '../../constants/mentionFinder';
export const StyledMentionFinder = styled.div`
position: relative;
`;
export const StyledMotionMentionFinderPopup = styled(motion.div)`
background-color: ${_ref => {
let {
theme
} = _ref;
return 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%;
${_ref2 => {
let {
$popupAlignment
} = _ref2;
switch ($popupAlignment) {
case MentionFinderPopupAlignment.Bottom:
return css`
top: 0;
`;
case MentionFinderPopupAlignment.Top:
return 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(
${_ref3 => {
let {
theme
} = _ref3;
return 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(
${_ref4 => {
let {
theme
} = _ref4;
return theme['text-rgb'];
}},
0.15
)
transparent;
scrollbar-width: thin;
}
`;
//# sourceMappingURL=MentionFinder.styles.js.map