{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "table", "type": "registry:ui", "title": "Table", "description": "Flex-based table primitives.", "registryDependencies": [ "https://raw.githubusercontent.com/truongnat/rnui/main/registry/dist/nativewind/utils.json", "https://raw.githubusercontent.com/truongnat/rnui/main/registry/dist/nativewind/text.json", "https://raw.githubusercontent.com/truongnat/rnui/main/registry/dist/nativewind/theme.json" ], "files": [ { "path": "registry/shared/ui/table.tsx", "type": "registry:ui", "target": "components/ui/table.tsx", "content": "import {\n Pressable,\n ScrollView,\n View,\n type ScrollViewProps,\n type ViewProps,\n} from 'react-native';\nimport { Text, type TextProps } from '@/components/ui/text';\nimport { cn } from '@/lib/utils';\n\nexport function Table({\n className,\n ...props\n}: ViewProps & { className?: string }) {\n return ;\n}\n\nexport function TableScroll({\n className,\n ...props\n}: ScrollViewProps & { className?: string }) {\n return ;\n}\n\nexport function TableHeader({\n className,\n ...props\n}: ViewProps & { className?: string }) {\n return (\n \n );\n}\n\nexport function TableBody({\n className,\n ...props\n}: ViewProps & { className?: string }) {\n return ;\n}\n\nexport interface TableRowProps extends ViewProps {\n className?: string;\n onPress?: () => void;\n}\n\nexport function TableRow({ className, onPress, ...props }: TableRowProps) {\n const row = (\n \n );\n if (!onPress) return row;\n return (\n \n {row}\n \n );\n}\n\nexport interface TableCellProps extends ViewProps {\n className?: string;\n /** Flex grow factor for the column. */\n flex?: number;\n}\n\nexport function TableHead({\n className,\n flex = 1,\n children,\n ...props\n}: TableCellProps) {\n return (\n \n {typeof children === 'string' ? (\n \n {children}\n \n ) : (\n children\n )}\n \n );\n}\n\nexport function TableCell({\n className,\n flex = 1,\n children,\n ...props\n}: TableCellProps) {\n return (\n \n {typeof children === 'string' ? (\n {children}\n ) : (\n children\n )}\n \n );\n}\n\nexport function TableCaption({ className, ...props }: TextProps) {\n return (\n \n );\n}\n" } ] }