UNPKG

@chayns-components/core

Version:

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

80 lines (76 loc) 1.98 kB
import { motion } from 'motion/react'; import styled, { css } from 'styled-components'; export const StyledSearchBox = styled.div``; 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; cursor: pointer; width: ${_ref2 => { let { $width } = _ref2; return $width; }}px; max-height: 300px; overflow-y: ${_ref3 => { let { $height } = _ref3; return $height <= 300 ? 'hidden' : 'auto'; }}; box-shadow: 0 0 0 1px rgba(${_ref4 => { let { theme } = _ref4; return theme['009-rgb']; }}, 0.08) inset; // Styles for custom scrollbar ${_ref5 => { let { $browser, theme } = _ref5; 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; } `; }} `; export const StyledSearchBoxIcon = styled.div` cursor: pointer; padding: 0 10px; `; export const StyledSearchBoxLeftWrapper = styled.div` display: flex; align-items: center; gap: 8px; `; //# sourceMappingURL=SearchBox.styles.js.map