UNPKG

@radix-ui/themes

Version:

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

38 lines (33 loc) 1.18 kB
import { asChildPropDef } from '../props/as-child.prop.js'; import { colorPropDef } from '../props/color.prop.js'; import { highContrastPropDef } from '../props/high-contrast.prop.js'; import { leadingTrimPropDef } from '../props/leading-trim.prop.js'; import { textAlignPropDef } from '../props/text-align.prop.js'; import { textWrapPropDef } from '../props/text-wrap.prop.js'; import { truncatePropDef } from '../props/truncate.prop.js'; import { weightPropDef } from '../props/weight.prop.js'; import type { PropDef } from '../props/prop-def.js'; const as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const; const sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const; const headingPropDefs = { as: { type: 'enum', values: as, default: 'h1' }, ...asChildPropDef, size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '6', responsive: true, }, ...weightPropDef, ...textAlignPropDef, ...leadingTrimPropDef, ...truncatePropDef, ...textWrapPropDef, ...colorPropDef, ...highContrastPropDef, } satisfies { as: PropDef<(typeof as)[number]>; size: PropDef<(typeof sizes)[number]>; }; export { headingPropDefs };