{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "clock-sm-13", "type": "registry:component", "dependencies": [ "lucide-react" ], "registryDependencies": [ "https://wigggle-ui.vercel.app/r/widget.json", "https://wigggle-ui.vercel.app/r/button.json", "https://chanhdai.com/r/wheel-picker.json" ], "files": [ { "path": "registry/default/widgets/clock/sm/clock-13.tsx", "content": "import { CheckIcon, XIcon } from \"lucide-react\";\r\n\r\nimport {\r\n Widget,\r\n WidgetContent,\r\n WidgetFooter,\r\n} from \"@/registry/default/ui/widget\";\r\nimport { Button } from \"@/registry/default/ui/button\";\r\n\r\nimport type { WheelPickerOption } from \"@/components/wheel-picker\";\r\nimport { WheelPicker, WheelPickerWrapper } from \"@/components/wheel-picker\";\r\n\r\nconst createArray = (length: number, add = 0): WheelPickerOption[] =>\r\n Array.from({ length }, (_, i) => {\r\n const value = i + add;\r\n return {\r\n label: value.toString().padStart(2, \"0\"),\r\n value: value.toString(),\r\n };\r\n });\r\n\r\nconst hourOptions = createArray(12, 1);\r\nconst minuteOptions = createArray(60);\r\nconst meridiemOptions: WheelPickerOption[] = [\r\n { label: \"AM\", value: \"AM\" },\r\n { label: \"PM\", value: \"PM\" },\r\n];\r\n\r\nexport default function WidgetDemo() {\r\n return (\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\n \r\n \r\n \r\n \r\n );\r\n}\r\n", "type": "registry:component" } ], "meta": { "tags": [ "clock" ], "size": "sm", "credits": [ { "name": "@ncdai", "homepage": "https://chanhdai.com/components/react-wheel-picker", "url": "https://chanhdai.com/r/{name}.json", "logo": "" } ] } }