mirror of
https://github.com/cosscom/coss.git
synced 2026-09-14 20:06:50 +08:00
9302c06311
* update biome config + resolve issues * improve the ui:sync command to run organizeImports on packages * reformat * build registry * exclude base-ui stuff * fix useExportsLast * further improvements * silence errors * exclude examples app * update biome + reformat * format all the other files * include examples app * improve copyable-field * remove unwanted comment * remove a few unneeded biome comments * avoid nested ternary * refactored some shared components * upgrade base ui to 1.2.0 * fix
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { ClockIcon } from "lucide-react";
|
|
import { Label } from "react-aria-components";
|
|
import { DateInput, TimeField } from "@/registry/default/ui/datefield-rac";
|
|
|
|
export default function Component() {
|
|
return (
|
|
<TimeField className="*:not-first:mt-2">
|
|
<Label className="font-medium text-foreground text-sm">
|
|
Time input with end icon
|
|
</Label>
|
|
<div className="relative">
|
|
<DateInput />
|
|
<div className="pointer-events-none absolute inset-y-0 end-0 z-10 flex items-center justify-center pe-3 text-muted-foreground/80">
|
|
<ClockIcon aria-hidden="true" size={16} />
|
|
</div>
|
|
</div>
|
|
<p
|
|
aria-live="polite"
|
|
className="mt-2 text-muted-foreground text-xs"
|
|
role="region"
|
|
>
|
|
Built with{" "}
|
|
<a
|
|
className="underline hover:text-foreground"
|
|
href="https://react-spectrum.adobe.com/react-aria/DateField.html"
|
|
rel="noreferrer noopener nofollow"
|
|
target="_blank"
|
|
>
|
|
React Aria
|
|
</a>
|
|
</p>
|
|
</TimeField>
|
|
);
|
|
}
|