Skip to content

Commit 0401a89

Browse files
authored
Switch sides on select menus (#111)
1 parent 1b82f22 commit 0401a89

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/select/index.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const SelectLabel = forwardRef<
9696
ElementRef<typeof SelectPrimitive.Label>,
9797
ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
9898
>(({ className, ...props }, ref) => (
99-
<SelectPrimitive.Label ref={ref} className={cx("py-1.5 pl-8 pr-2 text-sm font-semibold", className)} {...props} />
99+
<SelectPrimitive.Label ref={ref} className={cx("px-2 py-1.5 text-sm font-semibold", className)} {...props} />
100100
));
101101
SelectLabel.displayName = SelectPrimitive.Label.displayName;
102102

@@ -107,17 +107,16 @@ const SelectItem = forwardRef<
107107
<SelectPrimitive.Item
108108
ref={ref}
109109
className={cx(
110-
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-blue-600 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
110+
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-blue-600 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
111111
className,
112112
)}
113113
{...props}
114114
>
115-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
115+
<span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
116116
<SelectPrimitive.ItemIndicator>
117117
<Check className="h-4 w-4" weight="bold" />
118118
</SelectPrimitive.ItemIndicator>
119119
</span>
120-
121120
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
122121
</SelectPrimitive.Item>
123122
));

0 commit comments

Comments
 (0)