import { getLuminance } from 'color2k' import { useRouter } from 'next/router' import { Button } from './Button' import { SpanBox, HStack } from './LayoutPrimitives' import { Circle, X } from 'phosphor-react' import { isDarkTheme } from '../../lib/themeUpdater' import { theme } from '../tokens/stitches.config' type LabelChipProps = { text: string color: string // expected to be a RGB hex color string isSelected?: boolean useAppAppearance?: boolean xAction?: () => void } export function LabelChip(props: LabelChipProps): JSX.Element { const router = useRouter() const isDark = isDarkTheme() const luminance = getLuminance(props.color) const textColor = luminance > 0.5 ? '#000000' : '#ffffff' const selectedBorder = isDark ? '#FFEA9F' : 'black' const unSelectedBorder = isDark ? '#6A6968' : '#D9D9D9' // if (props.useAppAppearance) { return ( {props.text} {props.xAction && ( )} ) // } // return ( // // ) }