File tree Expand file tree Collapse file tree
packages/components/src/renderers/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ComponentRegistry } from '@object-ui/core' ;
2+ import type { CardSchema } from '@object-ui/types' ;
23import { renderChildren } from '../../lib/utils' ;
34import {
45 Card ,
@@ -10,7 +11,7 @@ import {
1011} from '@/ui' ;
1112
1213ComponentRegistry . register ( 'card' ,
13- ( { schema, className, ...props } ) => (
14+ ( { schema, className, ...props } : { schema : CardSchema ; className ?: string ; [ key : string ] : any } ) => (
1415 < Card className = { className } { ...props } >
1516 { ( schema . title || schema . description ) && (
1617 < CardHeader >
Original file line number Diff line number Diff line change 11import { ComponentRegistry } from '@object-ui/core' ;
2+ import type { ContainerSchema } from '@object-ui/types' ;
23import { renderChildren } from '../../lib/utils' ;
34import { cn } from '@/lib/utils' ;
45
56ComponentRegistry . register ( 'container' ,
6- ( { schema, className, ...props } ) => {
7+ ( { schema, className, ...props } : { schema : ContainerSchema ; className ?: string ; [ key : string ] : any } ) => {
78 const maxWidth = schema . maxWidth || 'xl' ;
89 const padding = schema . padding || 4 ;
910 const centered = schema . centered !== false ; // Default to true
Original file line number Diff line number Diff line change 11import { ComponentRegistry } from '@object-ui/core' ;
2+ import type { FlexSchema } from '@object-ui/types' ;
23import { renderChildren } from '../../lib/utils' ;
34import { cn } from '@/lib/utils' ;
45
56ComponentRegistry . register ( 'flex' ,
6- ( { schema, className, ...props } ) => {
7+ ( { schema, className, ...props } : { schema : FlexSchema ; className ?: string ; [ key : string ] : any } ) => {
78 const direction = schema . direction || 'row' ;
89 const justify = schema . justify || 'start' ;
910 const align = schema . align || 'start' ;
Original file line number Diff line number Diff line change 11import { ComponentRegistry } from '@object-ui/core' ;
2+ import type { GridSchema } from '@object-ui/types' ;
23import { renderChildren } from '../../lib/utils' ;
34import { cn } from '@/lib/utils' ;
45
56ComponentRegistry . register ( 'grid' ,
6- ( { schema, className, ...props } ) => {
7+ ( { schema, className, ...props } : { schema : GridSchema ; className ?: string ; [ key : string ] : any } ) => {
78 const gridCols = schema . columns || 2 ;
89 const gap = schema . gap || 4 ;
910
Original file line number Diff line number Diff line change 11import { ComponentRegistry } from '@object-ui/core' ;
2+ import type { TabsSchema } from '@object-ui/types' ;
23import { renderChildren } from '../../lib/utils' ;
34import {
45 Tabs ,
@@ -8,14 +9,14 @@ import {
89} from '@/ui' ;
910
1011ComponentRegistry . register ( 'tabs' ,
11- ( { schema, className, ...props } ) => (
12+ ( { schema, className, ...props } : { schema : TabsSchema ; className ?: string ; [ key : string ] : any } ) => (
1213 < Tabs defaultValue = { schema . defaultValue } className = { className } { ...props } >
1314 < TabsList >
14- { schema . items ?. map ( ( item : any ) => (
15+ { schema . items ?. map ( ( item ) => (
1516 < TabsTrigger key = { item . value } value = { item . value } > { item . label } </ TabsTrigger >
1617 ) ) }
1718 </ TabsList >
18- { schema . items ?. map ( ( item : any ) => (
19+ { schema . items ?. map ( ( item ) => (
1920 < TabsContent key = { item . value } value = { item . value } >
2021 { renderChildren ( item . body ) }
2122 </ TabsContent >
You can’t perform that action at this time.
0 commit comments