{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "information-status", "type": "registry:ui", "title": "Information Status", "description": "An information status component that can be used to display status messages.", "files": [ { "path": "registry/tra-kit/components/information-status.tsx", "content": "import { SealCheckIcon, SealWarningIcon, InfoIcon } from '@phosphor-icons/react';\r\nimport { cva } from 'class-variance-authority';\r\nimport React from 'react';\r\nimport { cn } from '@/lib/utils';\r\n\r\nexport const SealError: React.FC<{ className?: string }> = ({ className }) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n);\r\n\r\nconst informationStatusVariants = cva(\r\n 'flex w-fit max-w-full gap-1 overflow-hidden text-ellipsis whitespace-normal break-normal rounded-md px-4 py-2 text-sm font-medium',\r\n {\r\n variants: {\r\n type: {\r\n success: 'bg-success-light text-success',\r\n error: 'bg-error-light text-error',\r\n warning: 'bg-warning-light text-warning',\r\n info: 'bg-primary-15 text-primary',\r\n },\r\n },\r\n defaultVariants: {\r\n type: 'success',\r\n },\r\n },\r\n);\r\n\r\nconst iconsStyle = cva('min-w-fit text-base');\r\n\r\ninterface IInformationStatus {\r\n className?: string;\r\n icon?: React.ReactNode;\r\n isHaveIcon?: boolean;\r\n title: string | React.ReactNode;\r\n type?: 'success' | 'error' | 'warning' | 'info';\r\n}\r\n\r\nconst InformationStatus: React.FC = ({\r\n className,\r\n icon,\r\n isHaveIcon = false,\r\n title,\r\n type = 'success',\r\n ...otherProps\r\n}) => (\r\n \r\n \r\n {(isHaveIcon || icon) &&\r\n (type === 'success'\r\n ? (icon ?? )\r\n : type === 'warning'\r\n ? (icon ?? )\r\n : type === 'error'\r\n ? (icon ?? )\r\n : type === 'info'\r\n ? (icon ?? )\r\n : null)}\r\n \r\n {title}\r\n \r\n);\r\n\r\nexport default InformationStatus;\r\n", "type": "registry:ui" } ] }