Policy listhospitality
House rules and cancellation policy with check-in and check-out times and a zone-aware cancellation state.
설치
pnpm
pnpm dlx shadcn@4.23.0 add @uikit/policy-listDefault
policy-list-demo.tsx
import { dateOnly, timeOfDay } from "@plott/webkit-time";import { PolicyList, cancellationState } from "@/components/ui/policy-list";
const cancellation = cancellationState({ checkIn: dateOnly("2026-07-20"), now: Date.UTC(2026, 6, 1, 12), timeZone: "America/New_York", freeUntilDaysBefore: 2, deadlineTime: timeOfDay("23:59"), refundable: true,});
export default function PolicyListDemo() { return ( <PolicyList checkInTime={timeOfDay("15:00")} checkOutTime={timeOfDay("11:00")} cancellation={cancellation} timeZone="America/New_York" rules={[ { id: "smoking", title: "Smoking", body: "Smoking is not allowed inside the rooms." }, { id: "pets", title: "Pets", body: "Pets are allowed on request." }, ]} defaultOpen={["cancellation"]} /> );}