File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { ClassValue } from 'clsx' ;
2+ import type { ReactNode } from 'react' ;
3+
4+ export type AsTag =
5+ | 'a'
6+ | 'button'
7+ | 'div'
8+ | 'form'
9+ | 'h2'
10+ | 'h3'
11+ | 'img'
12+ | 'input'
13+ | 'label'
14+ | 'li'
15+ | 'nav'
16+ | 'ol'
17+ | 'p'
18+ | 'span'
19+ | 'svg'
20+ | 'ul'
21+ | 'template'
22+ | ( { } & string ) ;
23+
24+ export interface PrimitiveProps {
25+ /**
26+ * The element or component this component should render as. Can be overwrite by `asChild`
27+ *
28+ * @defaultValue 'div'
29+ */
30+ as ?: AsTag | ReactNode ;
31+ /**
32+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
33+ *
34+ * Read our [Composition](https://www.soybean-ui.com/docs/guides/composition) guide for more details.
35+ */
36+ asChild ?: boolean ;
37+ }
38+
39+ export type BaseProps < T > = Omit < T , 'className' > & {
40+ className ?: ClassValue ;
41+ } ;
You can’t perform that action at this time.
0 commit comments