UNPKG

@radix-ui/themes

Version:

[![Radix Themes Logo](https://radix-ui.com/social/themes.png)](https://radix-ui.com/themes)

27 lines (23 loc) 848 B
import { asChildPropDef, accentColorPropDef, highContrastPropDef, radiusPropDef, } from '../props/index.js'; import type { PropDef } from '../props/index.js'; const sizes = ['1', '2', '3', '4'] as const; const variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost'] as const; const baseButtonPropDefs = { ...asChildPropDef, size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true }, variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' }, ...accentColorPropDef, ...highContrastPropDef, ...radiusPropDef, loading: { type: 'boolean', className: 'rt-loading', default: false }, } satisfies { size: PropDef<(typeof sizes)[number]>; variant: PropDef<(typeof variants)[number]>; loading: PropDef<boolean>; }; export { baseButtonPropDefs };