mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-09 06:55:07 +00:00
feat(button): support render delegation with asChild parameter (#174)
This commit is contained in:
11
apps/www/components/examples/button/as-child.tsx
Normal file
11
apps/www/components/examples/button/as-child.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import { Button } from "@/components/ui/button"
|
||||
|
||||
export function ButtonAsChild() {
|
||||
return (
|
||||
<Button asChild>
|
||||
<Link href="/login">Login</Link>
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user