Skip to content

Commit

Permalink
docs: use SlotProps type in default example
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano authored and guilhermerodz committed Feb 22, 2024
1 parent f6ef25c commit 776425a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The example below uses `tailwindcss` `@shadcn/ui` `tailwind-merge` `clsx`:

```tsx
'use client'
import { OTPInput } from 'input-otp'
import { OTPInput, SlotProps } from 'input-otp'

<OTPInput
maxLength={6}
Expand All @@ -52,11 +52,7 @@ import { OTPInput } from 'input-otp'
/>

// Feel free to copy. Uses @shadcn/ui tailwind colors.
function Slot(props: {
char: string | null;
isActive: boolean;
hasFakeCaret: boolean;
}) {
function Slot(props: SlotProps) {
return (
<div
className={cn(
Expand Down

0 comments on commit 776425a

Please sign in to comment.