UNPKG

@chayns-components/core

Version:

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

114 lines (108 loc) 2.56 kB
import { motion } from 'motion/react'; import styled, { css } from 'styled-components'; export const StyledMotionSearchBoxBody = styled(motion.div)` background: ${_ref => { let { theme } = _ref; return theme['000']; }}; position: absolute; z-index: 4; display: flex; flex-direction: column; border: 1px solid rgba(160, 160, 160, 0.3); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top: none; width: ${_ref2 => { let { $width } = _ref2; return $width - 2; }}px; max-height: 300px; box-shadow: 0 0 0 1px rgba(${_ref3 => { let { theme } = _ref3; return theme['009-rgb']; }}, 0.08) inset; `; export const StyledSearchBoxBodyHead = styled.div` padding: 10px 10px 5px; display: flex; flex-direction: column; ${_ref4 => { let { $hasGroupName } = _ref4; return $hasGroupName && css` gap: 15px; `; }} ${_ref5 => { let { $hasScrolled } = _ref5; return $hasScrolled && css` box-shadow: 0 1px 4px #0000001a; `; }} `; export const StyledSearchBoxBodyHeadGroupName = styled.div` color: ${_ref6 => { let { theme } = _ref6; return theme.text; }}; font-weight: bold; `; export const StyledSearchBoxBodyContent = styled.div` display: flex; flex-direction: column; cursor: pointer; width: 100%; max-height: ${_ref7 => { let { $headHeight } = _ref7; return 300 - $headHeight; }}px; overflow-y: ${_ref8 => { let { $height, $headHeight } = _ref8; return $height + $headHeight <= 300 ? 'hidden' : 'auto'; }}; // Styles for custom scrollbar ${_ref9 => { let { $browser, theme } = _ref9; return $browser === 'firefox' ? css` scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent; scrollbar-width: thin; ` : css` &::-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['text-rgb']}, 0.15); border-radius: 20px; } `; }} `; //# sourceMappingURL=SearchBoxBody.styles.js.map