MCPcopy Create free account
hub / github.com/bytebase/dbhub / SelectItem

Function SelectItem

frontend/src/components/ui/select.tsx:107–141  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: SelectPrimitive.Item.Props)

Source from the content-addressed store, hash-verified

105}
106
107function SelectItem({
108 className,
109 children,
110 ...props
111}: SelectPrimitive.Item.Props) {
112 return (
113 <SelectPrimitive.Item
114 className={cn(
115 "grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
116 className,
117 )}
118 data-slot="select-item"
119 {...props}
120 >
121 <SelectPrimitive.ItemIndicator className="col-start-1">
122 <svg
123 fill="none"
124 height="24"
125 stroke="currentColor"
126 strokeLinecap="round"
127 strokeLinejoin="round"
128 strokeWidth="2"
129 viewBox="0 0 24 24"
130 width="24"
131 xmlns="http://www.w3.org/1500/svg"
132 >
133 <path d="M5.252 12.7 10.2 18.63 18.748 5.37" />
134 </svg>
135 </SelectPrimitive.ItemIndicator>
136 <SelectPrimitive.ItemText className="col-start-2 min-w-0">
137 {children}
138 </SelectPrimitive.ItemText>
139 </SelectPrimitive.Item>
140 );
141}
142
143function SelectSeparator({
144 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected