Function
SelectTrigger
({
className,
size = 'default',
children,
...props
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
size?: 'sm' | 'default';
})
Source from the content-addressed store, hash-verified
| 22 | } |
| 23 | |
| 24 | function SelectTrigger({ |
| 25 | className, |
| 26 | size = 'default', |
| 27 | children, |
| 28 | ...props |
| 29 | }: React.ComponentProps<typeof SelectPrimitive.Trigger> & { |
| 30 | size?: 'sm' | 'default'; |
| 31 | }) { |
| 32 | return ( |
| 33 | <SelectPrimitive.Trigger |
| 34 | className={cn( |
| 35 | "flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-8 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0", |
| 36 | className |
| 37 | )} |
| 38 | data-size={size} |
| 39 | data-slot="select-trigger" |
| 40 | {...props} |
| 41 | > |
| 42 | {children} |
| 43 | <SelectPrimitive.Icon asChild> |
| 44 | <ChevronDownIcon className="size-4 opacity-50" /> |
| 45 | </SelectPrimitive.Icon> |
| 46 | </SelectPrimitive.Trigger> |
| 47 | ); |
| 48 | } |
| 49 | |
| 50 | function SelectContent({ |
| 51 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected