import { KBarResults, useMatches } from 'kbar' import { theme } from '../tokens/stitches.config' import { Box, SpanBox } from './LayoutPrimitives' export const searchStyle = { padding: '14px 16px', fontSize: '16px', width: '100%', outline: 'none', border: 'none', boxSizing: 'border-box' as React.CSSProperties['boxSizing'], backgroundColor: theme.colors.grayBase.toString(), color: theme.colors.grayTextContrast.toString(), } export const animatorStyle = { width: '100%', overflow: 'hidden', maxWidth: '600px', borderRadius: '8px', color: theme.colors.grayTextContrast.toString(), backgroundColor: theme.colors.grayBase.toString(), boxShadow: theme.shadows.cardBoxShadow.toString(), border: `1px solid ${theme.colors.grayBorder.toString()}`, } const groupNameStyle = { padding: '8px 16px', fontSize: '10px', textTransform: 'uppercase' as const, opacity: 0.5, } export const KBarResultsComponents = () => { const { results } = useMatches() return ( { return typeof item === 'string' ? ( {item.toLocaleUpperCase()} ) : ( {item.name} {item.shortcut?.map((st, idx) => ( {st} ))} ) }} /> ) }