MCPcopy Create free account
hub / github.com/COW-dev/ddingdong-fe / SelectButton

Function SelectButton

packages/shared/ui/Select/SelectButton.tsx:35–74  ·  view source on GitHub ↗
({
  selected,
  onClick,
  isOpen,
  size = 'lg',
  className,
  ...props
}: Props)

Source from the content-addressed store, hash-verified

33} as const;
34
35export function SelectButton({
36 selected,
37 onClick,
38 isOpen,
39 size = 'lg',
40 className,
41 ...props
42}: Props) {
43 return (
44 <Flex
45 alignItems="center"
46 onClick={onClick}
47 className={cn(
48 sizeVariants[size],
49 'w-full border border-gray-200 bg-white font-semibold whitespace-nowrap text-gray-400',
50 className
51 )}
52 {...props}
53 >
54 <button
55 type="button"
56 className={cn(
57 'flex w-full cursor-pointer items-center justify-between rounded-xl align-middle leading-none',
58 isOpen && 'hover:rounded-b-none'
59 )}
60 >
61 {selected}
62 <Icon
63 size={24}
64 name="arrowDown"
65 className={cn(
66 'transform transition-transform duration-300',
67 isOpen && 'rotate-180',
68 size === 'md' && 'w-5'
69 )}
70 />
71 </button>
72 </Flex>
73 );
74}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected