"use client"
import { ChevronDownIcon } from "lucide-react"
import { twMerge } from "tailwind-merge"
import { ShowMore } from "@/components/ui/preskok-ui/show-more"
export function ShowMorePreskokDemo() {
return (
<div className="py-6">
<ShowMore>
{({ isSelected }) => (
<>
Show {isSelected ? "less" : "more"}
<ChevronDownIcon
className={twMerge(
isSelected ? "rotate-180" : "",
"size-4 transition-transform duration-200"
)}
/>
</>
)}
</ShowMore>
</div>
)
}
Installation
CLI
Manual
pnpmnpmyarnbunpnpm dlx @preskok-org/ui@latest add show-more
Usage
import { ShowMore } from "@/registry/preskok/ui/preskok-ui/show-more"
export function ShowMoreDemo() {
return <ShowMore>{"Lorem ipsum dolor sit amet..."}</ShowMore>
}