diff --git a/apps/web/components/ui/form/Select.tsx b/apps/web/components/ui/form/Select.tsx index b8be24b811..42aedbf02e 100644 --- a/apps/web/components/ui/form/Select.tsx +++ b/apps/web/components/ui/form/Select.tsx @@ -88,7 +88,6 @@ function Select< : { /** Light Theme starts */ primary: "var(--brand-color)", - primary50: "rgba(209 , 213, 219, var(--tw-bg-opacity))", primary25: "rgba(244, 245, 246, var(--tw-bg-opacity))", /** Light Theme Ends */ diff --git a/packages/ui/v2/core/form/Select.tsx b/packages/ui/v2/core/form/Select.tsx index 9a0e5ad12e..fb72b8efae 100644 --- a/packages/ui/v2/core/form/Select.tsx +++ b/packages/ui/v2/core/form/Select.tsx @@ -1,9 +1,18 @@ import { useId } from "@radix-ui/react-id"; import * as React from "react"; -import ReactSelect, { components, GroupBase, InputProps, Props, SingleValue, MultiValue } from "react-select"; +import ReactSelect, { + components, + GroupBase, + InputProps, + Props, + SingleValue, + MultiValue, + OptionProps, +} from "react-select"; import classNames from "@calcom/lib/classNames"; import { useLocale } from "@calcom/lib/hooks/useLocale"; +import { Icon } from "@calcom/ui/Icon"; import { Label } from "./fields"; @@ -26,6 +35,17 @@ export const InputComponent = >({ + className, + ...props +}: OptionProps) => { + return ( + + {props.label} {props.isSelected && } + + ); +}; + function Select< Option, IsMulti extends boolean = false, @@ -43,7 +63,7 @@ function Select< borderRadius: 6, colors: { ...theme.colors, - primary: "var(--brand-color)", + primary: "rgba(229, 231, 235, var(--tw-bg-opacity))", primary50: "rgba(209 , 213, 219, var(--tw-bg-opacity))", primary25: "rgba(244, 245, 246, var(--tw-bg-opacity))", }, @@ -59,8 +79,7 @@ function Select< }), option: (provided, state) => ({ ...provided, - backgroundColor: state.isSelected ? "var(--brand-color)" : state.isFocused ? "#F3F4F6" : "", - color: state.isSelected ? "var(--brand-text-color)" : "black", + color: "black", ":active": { backgroundColor: state.isSelected ? "" : "var(--brand-color)", color: "var(--brand-text-color)", @@ -71,6 +90,7 @@ function Select< ...components, IndicatorSeparator: () => null, Input: InputComponent, + Option: OptionComponent, ...props.components, }} {...props}