mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
22 lines
547 B
TypeScript
22 lines
547 B
TypeScript
import * as React from "react"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
const List = React.forwardRef<
|
|
HTMLUListElement,
|
|
React.HTMLAttributes<HTMLUListElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<ul ref={ref} className={cn("space-y-2", className)} {...props} />
|
|
))
|
|
List.displayName = "List"
|
|
|
|
const ListItem = React.forwardRef<
|
|
HTMLLIElement,
|
|
React.HTMLAttributes<HTMLLIElement>
|
|
>(({ className, ...props }, ref) => (
|
|
<li ref={ref} className={cn("", className)} {...props} />
|
|
))
|
|
ListItem.displayName = "ListItem"
|
|
|
|
export { List, ListItem }
|