import { AlphaColorProps, Flex, gloss, GlossProps } from 'gloss' import { Size } from '../Space' import { TextSizeProps, textSizeTheme } from './textSizeTheme' export type SimpleTextPropsBase = Omit & AlphaColorProps & { size?: Size ellipse?: boolean selectable?: boolean } export type SimpleTextProps = GlossProps export const SimpleText = gloss(Flex, { applyThemeColor: true, applyPsuedoColors: 'only-if-defined', display: 'inline-block', whiteSpace: 'normal', conditional: { ellipse: { display: 'block', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', }, selectable: { userSelect: 'text', }, pointable: { cursor: 'pointer', }, }, }).theme(textSizeTheme)