import * as React from 'react' import { Flex, panda } from '../../styled-system/jsx' import { ColorWrapper } from './color-wrapper' import * as context from '../lib/panda-context' // remove initial underscore const cleanCondition = (condition: string) => condition.replace(/^_/, '') export function SemanticColorDisplay(props: { value: string; condition: string; token?: string }) { const { value, condition } = props const tokenValue = context.tokens.deepResolveReference(value) return ( {cleanCondition(condition)} {value} {value !== tokenValue && `- ${tokenValue}`} ) }