/** * Divider (native). RN View with a border. */ import type { ReactNode } from "react"; import { Text as RNText, View, type ViewStyle } from "react-native"; import { useTheme } from "@plyxui/styles"; import { spacing } from "@plyxui/core"; export interface DividerProps { orientation?: "horizontal" | "vertical"; label?: ReactNode; inset?: number; color?: string; thickness?: number; style?: ViewStyle; } export function Divider({ orientation = "horizontal", label, inset = 0, color, thickness = 1, style, }: DividerProps) { const { colors } = useTheme(); const lineColor = color ?? colors.stroke; if (orientation === "vertical") { return ( ); } if (label) { return ( {typeof label === "string" ? ( {label} ) : ( label )} ); } return ( ); }