UNPKG

@radix-ui/themes

Version:

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

16 lines (15 loc) 644 B
import * as React from 'react'; import type { ComponentPropsWithout, RemovedProps } from '../helpers/index.js'; import type { MarginProps, LayoutProps, BoxOwnProps } from '../props/index.js'; interface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps { } type BoxDivProps = { as?: 'div'; } & ComponentPropsWithout<'div', RemovedProps>; type BoxSpanProps = { as: 'span'; } & ComponentPropsWithout<'span', RemovedProps>; type BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps); declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>; export { Box }; export type { BoxProps };