From 801f75f4069f2f1c133745c9a886e1e99caee73a Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:25:09 +0530 Subject: [PATCH] chore: drop-downs improvements and bug fixes (#3433) * chore: dropdowns should close on selecting an option * style: @plane/ui dropdown styling * refactor: @plane/ui dropdowns * fix: build errors * fix: list layout dropdowns positioning * fix: priority dropdown text in dark mode --- packages/ui/src/dropdowns/custom-menu.tsx | 36 ++-- .../ui/src/dropdowns/custom-search-select.tsx | 83 +++---- packages/ui/src/dropdowns/custom-select.tsx | 52 ++--- packages/ui/src/dropdowns/helper.tsx | 1 - .../custom-analytics/select/project.tsx | 7 +- .../custom-analytics/select/segment.tsx | 1 - .../custom-analytics/select/x-axis.tsx | 1 - .../custom-analytics/select/y-axis.tsx | 2 +- .../automation/auto-archive-automation.tsx | 1 - .../automation/auto-close-automation.tsx | 2 - web/components/core/activity.tsx | 20 +- web/components/core/theme/theme-switch.tsx | 1 - web/components/cycles/cycles-board-card.tsx | 2 +- web/components/cycles/cycles-list-item.tsx | 2 +- web/components/cycles/sidebar.tsx | 2 +- web/components/dropdowns/cycle.tsx | 13 +- web/components/dropdowns/date.tsx | 204 +++++++++--------- web/components/dropdowns/estimate.tsx | 13 +- .../dropdowns/member/project-member.tsx | 3 + web/components/dropdowns/member/types.d.ts | 34 ++- .../dropdowns/member/workspace-member.tsx | 22 +- web/components/dropdowns/module.tsx | 17 +- web/components/dropdowns/priority.tsx | 87 +++----- web/components/dropdowns/project.tsx | 17 +- web/components/dropdowns/state.tsx | 17 +- web/components/dropdowns/types.d.ts | 12 ++ web/components/headers/cycle-issues.tsx | 1 - web/components/headers/module-issues.tsx | 1 - .../integration/jira/give-details.tsx | 2 +- .../integration/jira/import-users.tsx | 2 +- .../issues/issue-detail/cycle-select.tsx | 1 - .../issues/issue-detail/module-select.tsx | 1 - .../kanban/headers/group-by-card.tsx | 1 - .../issues/issue-layouts/list/block.tsx | 2 +- .../list/headers/group-by-card.tsx | 1 - .../spreadsheet/columns/header-column.tsx | 1 - .../issues/sub-issues/issue-list-item.tsx | 2 +- .../issues/view-select/estimate.tsx | 2 +- web/components/modules/module-card-item.tsx | 2 +- web/components/modules/module-list-item.tsx | 2 +- web/components/modules/sidebar.tsx | 2 +- .../select-snooze-till-modal.tsx | 2 +- web/components/pages/pages-list/list-item.tsx | 2 +- web/components/project/member-select.tsx | 1 - .../project/send-project-invitation-modal.tsx | 4 +- web/components/states/create-state-modal.tsx | 2 +- web/components/views/view-list-item.tsx | 2 +- .../workspace/create-workspace-form.tsx | 2 +- .../send-workspace-invitation-modal.tsx | 2 +- .../workspace/settings/workspace-details.tsx | 2 +- .../workspace/views/view-list-item.tsx | 2 +- web/pages/profile/index.tsx | 6 +- 52 files changed, 308 insertions(+), 394 deletions(-) diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx index df2e99a3d..7ef99370f 100644 --- a/packages/ui/src/dropdowns/custom-menu.tsx +++ b/packages/ui/src/dropdowns/custom-menu.tsx @@ -1,17 +1,15 @@ import * as React from "react"; import ReactDOM from "react-dom"; -// react-popper +import { Menu } from "@headlessui/react"; import { usePopper } from "react-popper"; +import { ChevronDown, MoreHorizontal } from "lucide-react"; // hooks import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down"; import useOutsideClickDetector from "../hooks/use-outside-click-detector"; -// headless ui -import { Menu } from "@headlessui/react"; -// type -import { ICustomMenuDropdownProps, ICustomMenuItemProps } from "./helper"; -// icons -import { ChevronDown, MoreHorizontal } from "lucide-react"; +// helpers import { cn } from "../../helpers"; +// types +import { ICustomMenuDropdownProps, ICustomMenuItemProps } from "./helper"; const CustomMenu = (props: ICustomMenuDropdownProps) => { const { @@ -29,7 +27,6 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => { noChevron = false, optionsClassName = "", verticalEllipsis = false, - width = "auto", portalElement, menuButtonOnClick, tabIndex, @@ -63,17 +60,16 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => { static >
{ as="div" ref={dropdownRef} tabIndex={tabIndex} - className={`relative w-min text-left ${className}`} + className={cn("relative w-min text-left", className)} onKeyDown={handleKeyDown} > {({ open }) => ( diff --git a/packages/ui/src/dropdowns/custom-search-select.tsx b/packages/ui/src/dropdowns/custom-search-select.tsx index f9af00c93..9695eb931 100644 --- a/packages/ui/src/dropdowns/custom-search-select.tsx +++ b/packages/ui/src/dropdowns/custom-search-select.tsx @@ -1,14 +1,12 @@ import React, { useRef, useState } from "react"; - -// react-popper import { usePopper } from "react-popper"; +import { Combobox } from "@headlessui/react"; +import { Check, ChevronDown, Search } from "lucide-react"; // hooks import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down"; import useOutsideClickDetector from "../hooks/use-outside-click-detector"; -// headless ui -import { Combobox } from "@headlessui/react"; -// icons -import { Check, ChevronDown, Search } from "lucide-react"; +// helpers +import { cn } from "../../helpers"; // types import { ICustomSearchSelectProps } from "./helper"; @@ -31,7 +29,6 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => { onOpen, optionsClassName = "", value, - width = "auto", tabIndex, } = props; const [query, setQuery] = useState(""); @@ -70,7 +67,7 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => { as="div" ref={dropdownRef} tabIndex={tabIndex} - className={`relative flex-shrink-0 text-left ${className}`} + className={cn("relative flex-shrink-0 text-left", className)} onKeyDown={handleKeyDown} {...comboboxProps} > @@ -114,37 +111,33 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => { )} {isOpen && ( - +
-
- +
+ setQuery(e.target.value)} - placeholder="Type to search..." + placeholder="Search" displayValue={(assigned: any) => assigned?.name} />
{filteredOptions ? ( filteredOptions.length > 0 ? ( @@ -152,37 +145,31 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => { - `flex cursor-pointer select-none items-center justify-between gap-2 truncate rounded px-1 py-1.5 ${ - active || selected ? "bg-custom-background-80" : "" - } ${selected ? "text-custom-text-100" : "text-custom-text-200"}` + className={({ active }) => + cn( + "w-full truncate flex items-center justify-between gap-2 rounded px-1 py-1.5 cursor-pointer select-none", + { + "bg-custom-background-80": active, + } + ) } + onClick={() => { + if (!multiple) closeDropdown(); + }} > - {({ active, selected }) => ( + {({ selected }) => ( <> - {option.content} - {multiple ? ( -
- -
- ) : ( - - )} + {option.content} + {selected && } )}
)) ) : ( - -

No matching results

-
+

No matches found

) ) : ( -

Loading...

+

Loading...

)}
{footerOption} diff --git a/packages/ui/src/dropdowns/custom-select.tsx b/packages/ui/src/dropdowns/custom-select.tsx index 805368b4b..0fa183cb2 100644 --- a/packages/ui/src/dropdowns/custom-select.tsx +++ b/packages/ui/src/dropdowns/custom-select.tsx @@ -1,14 +1,12 @@ import React, { useRef, useState } from "react"; - -// react-popper import { usePopper } from "react-popper"; +import { Listbox } from "@headlessui/react"; +import { Check, ChevronDown } from "lucide-react"; // hooks import { useDropdownKeyDown } from "../hooks/use-dropdown-key-down"; import useOutsideClickDetector from "../hooks/use-outside-click-detector"; -// headless ui -import { Listbox } from "@headlessui/react"; -// icons -import { Check, ChevronDown } from "lucide-react"; +// helpers +import { cn } from "../../helpers"; // types import { ICustomSelectItemProps, ICustomSelectProps } from "./helper"; @@ -28,7 +26,6 @@ const CustomSelect = (props: ICustomSelectProps) => { onChange, optionsClassName = "", value, - width = "auto", tabIndex, } = props; // states @@ -57,7 +54,7 @@ const CustomSelect = (props: ICustomSelectProps) => { tabIndex={tabIndex} value={value} onChange={onChange} - className={`relative flex-shrink-0 text-left ${className}`} + className={cn("relative flex-shrink-0 text-left", className)} onKeyDown={handleKeyDown} disabled={disabled} > @@ -94,24 +91,23 @@ const CustomSelect = (props: ICustomSelectProps) => { )} {isOpen && ( - + closeDropdown()} static>
-
{children}
+ {children}
)} @@ -124,16 +120,20 @@ const Option = (props: ICustomSelectItemProps) => { return ( - `cursor-pointer select-none truncate rounded px-1 py-1.5 ${ - active || selected ? "bg-custom-background-80" : "" - } ${selected ? "text-custom-text-100" : "text-custom-text-200"} ${className}` + className={({ active }) => + cn( + "cursor-pointer select-none truncate rounded px-1 py-1.5 text-custom-text-200", + { + "bg-custom-background-80": active, + }, + className + ) } > {({ selected }) => (
{children}
- {selected && } + {selected && }
)}
diff --git a/packages/ui/src/dropdowns/helper.tsx b/packages/ui/src/dropdowns/helper.tsx index 9c0ae0566..453a33b63 100644 --- a/packages/ui/src/dropdowns/helper.tsx +++ b/packages/ui/src/dropdowns/helper.tsx @@ -13,7 +13,6 @@ export interface IDropdownProps { noChevron?: boolean; onOpen?: () => void; optionsClassName?: string; - width?: "auto" | string; placement?: Placement; tabIndex?: number; } diff --git a/web/components/analytics/custom-analytics/select/project.tsx b/web/components/analytics/custom-analytics/select/project.tsx index ee3dce6d6..3c08e1574 100644 --- a/web/components/analytics/custom-analytics/select/project.tsx +++ b/web/components/analytics/custom-analytics/select/project.tsx @@ -21,9 +21,9 @@ export const SelectProject: React.FC = observer((props) => { value: projectDetails?.id, query: `${projectDetails?.name} ${projectDetails?.identifier}`, content: ( -
- {projectDetails?.identifier} - {projectDetails?.name} +
+ {projectDetails?.identifier} + {projectDetails?.name}
), }; @@ -42,7 +42,6 @@ export const SelectProject: React.FC = observer((props) => { .join(", ") : "All projects" } - optionsClassName="min-w-full max-w-[20rem]" multiple /> ); diff --git a/web/components/analytics/custom-analytics/select/segment.tsx b/web/components/analytics/custom-analytics/select/segment.tsx index b45c1fa55..055665d9e 100644 --- a/web/components/analytics/custom-analytics/select/segment.tsx +++ b/web/components/analytics/custom-analytics/select/segment.tsx @@ -28,7 +28,6 @@ export const SelectSegment: React.FC = ({ value, onChange, params }) => { } onChange={onChange} - width="w-full" maxHeight="lg" > No value diff --git a/web/components/analytics/custom-analytics/select/x-axis.tsx b/web/components/analytics/custom-analytics/select/x-axis.tsx index 237582ba0..74ee99a77 100644 --- a/web/components/analytics/custom-analytics/select/x-axis.tsx +++ b/web/components/analytics/custom-analytics/select/x-axis.tsx @@ -24,7 +24,6 @@ export const SelectXAxis: React.FC = (props) => { value={value} label={{ANALYTICS_X_AXIS_VALUES.find((v) => v.value === value)?.label}} onChange={onChange} - width="w-full" maxHeight="lg" > {ANALYTICS_X_AXIS_VALUES.map((item) => { diff --git a/web/components/analytics/custom-analytics/select/y-axis.tsx b/web/components/analytics/custom-analytics/select/y-axis.tsx index 604457945..9f66c6b54 100644 --- a/web/components/analytics/custom-analytics/select/y-axis.tsx +++ b/web/components/analytics/custom-analytics/select/y-axis.tsx @@ -15,7 +15,7 @@ export const SelectYAxis: React.FC = ({ value, onChange }) => ( value={value} label={{ANALYTICS_Y_AXIS_VALUES.find((v) => v.value === value)?.label ?? "None"}} onChange={onChange} - width="w-full" + maxHeight="lg" > {ANALYTICS_Y_AXIS_VALUES.map((item) => ( diff --git a/web/components/automation/auto-archive-automation.tsx b/web/components/automation/auto-archive-automation.tsx index 3d5f6352e..974efff3a 100644 --- a/web/components/automation/auto-archive-automation.tsx +++ b/web/components/automation/auto-archive-automation.tsx @@ -79,7 +79,6 @@ export const AutoArchiveAutomation: React.FC = observer((props) => { handleChange({ archive_in: val }); }} input - width="w-full" disabled={!isAdmin} > <> diff --git a/web/components/automation/auto-close-automation.tsx b/web/components/automation/auto-close-automation.tsx index 49dd77e10..8d6662c11 100644 --- a/web/components/automation/auto-close-automation.tsx +++ b/web/components/automation/auto-close-automation.tsx @@ -106,7 +106,6 @@ export const AutoCloseAutomation: React.FC = observer((props) => { handleChange({ close_in: val }); }} input - width="w-full" disabled={!isAdmin} > <> @@ -161,7 +160,6 @@ export const AutoCloseAutomation: React.FC = observer((props) => { }} options={options} disabled={!multipleOptions} - width="w-full" input />
diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx index 792102be0..b281b8c36 100644 --- a/web/components/core/activity.tsx +++ b/web/components/core/activity.tsx @@ -43,7 +43,7 @@ const IssueLink = ({ activity }: { activity: IIssueActivity }) => { }`} target={activity.issue === null ? "_self" : "_blank"} rel={activity.issue === null ? "" : "noopener noreferrer"} - className="inline-flex items-center gap-1 font-medium text-custom-text-100 hover:underline" + className="inline-flex items-center gap-1 font-medium text-custom-text-100 hover:underline whitespace-nowrap" > {activity.issue_detail ? `${activity.project_detail.identifier}-${activity.issue_detail.sequence_id}` : "Issue"}{" "} {activity.issue_detail?.name} @@ -123,7 +123,6 @@ const activityDetails: { to )} - . ); else @@ -136,7 +135,6 @@ const activityDetails: { from )} - . ); }, @@ -181,7 +179,6 @@ const activityDetails: { from )} - . ); }, @@ -197,7 +194,6 @@ const activityDetails: { of )} - . ), icon:
} - width="max-w-[10rem]" noChevron disabled={disableSelect} /> diff --git a/web/components/issues/issue-detail/module-select.tsx b/web/components/issues/issue-detail/module-select.tsx index 4ac5f1fa5..05d7035b6 100644 --- a/web/components/issues/issue-detail/module-select.tsx +++ b/web/components/issues/issue-detail/module-select.tsx @@ -93,7 +93,6 @@ export const IssueModuleSelect: React.FC = observer((props)
} - width="max-w-[10rem]" noChevron disabled={disableSelect} /> diff --git a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx index 3bb49106b..512a071bc 100644 --- a/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx +++ b/web/components/issues/issue-layouts/kanban/headers/group-by-card.tsx @@ -135,7 +135,6 @@ export const HeaderGroupByCard: FC = observer((props) => { {!disableIssueCreation && (renderExistingIssueModal ? ( diff --git a/web/components/issues/issue-layouts/list/block.tsx b/web/components/issues/issue-layouts/list/block.tsx index 820f98fdd..da63a834e 100644 --- a/web/components/issues/issue-layouts/list/block.tsx +++ b/web/components/issues/issue-layouts/list/block.tsx @@ -73,7 +73,7 @@ export const IssueBlock: React.FC = observer((props: IssueBlock {!issue?.tempId ? ( <> diff --git a/web/components/issues/issue-layouts/spreadsheet/columns/header-column.tsx b/web/components/issues/issue-layouts/spreadsheet/columns/header-column.tsx index 040000218..dc9f8c7c6 100644 --- a/web/components/issues/issue-layouts/spreadsheet/columns/header-column.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/columns/header-column.tsx @@ -62,7 +62,6 @@ export const SpreadsheetHeaderColumn = (props: Props) => {
} - width="xl" placement="bottom-end" > handleOrderBy(propertyDetails.ascendingOrderKey, property)}> diff --git a/web/components/issues/sub-issues/issue-list-item.tsx b/web/components/issues/sub-issues/issue-list-item.tsx index 0e8fe76a2..033473470 100644 --- a/web/components/issues/sub-issues/issue-list-item.tsx +++ b/web/components/issues/sub-issues/issue-list-item.tsx @@ -134,7 +134,7 @@ export const IssueListItem: React.FC = observer((props) => {
- + {disabled && ( handleIssueCrudState("update", parentIssueId, issue)}>
diff --git a/web/components/issues/view-select/estimate.tsx b/web/components/issues/view-select/estimate.tsx index bcad6a51c..c9b29af95 100644 --- a/web/components/issues/view-select/estimate.tsx +++ b/web/components/issues/view-select/estimate.tsx @@ -42,7 +42,7 @@ export const ViewEstimateSelect: React.FC = observer((props) => { maxHeight="md" noChevron disabled={disabled} - width="w-full min-w-[8rem]" + optionsClassName="w-full" > <> diff --git a/web/components/modules/module-card-item.tsx b/web/components/modules/module-card-item.tsx index f69e6ba2e..f9236ef10 100644 --- a/web/components/modules/module-card-item.tsx +++ b/web/components/modules/module-card-item.tsx @@ -232,7 +232,7 @@ export const ModuleCardItem: React.FC = observer((props) => { ))} - + {isEditingAllowed && ( <> diff --git a/web/components/modules/module-list-item.tsx b/web/components/modules/module-list-item.tsx index bb868d7e0..c24e75198 100644 --- a/web/components/modules/module-list-item.tsx +++ b/web/components/modules/module-list-item.tsx @@ -209,7 +209,7 @@ export const ModuleListItem: React.FC = observer((props) => { ))} - + {isEditingAllowed && ( <> diff --git a/web/components/modules/sidebar.tsx b/web/components/modules/sidebar.tsx index 803e1879b..5b2c8f170 100644 --- a/web/components/modules/sidebar.tsx +++ b/web/components/modules/sidebar.tsx @@ -291,7 +291,7 @@ export const ModuleDetailsSidebar: React.FC = observer((props) => { {isEditingAllowed && ( - + setModuleDeleteModal(true)}> diff --git a/web/components/notifications/select-snooze-till-modal.tsx b/web/components/notifications/select-snooze-till-modal.tsx index b8312d7d0..ab3497bb8 100644 --- a/web/components/notifications/select-snooze-till-modal.tsx +++ b/web/components/notifications/select-snooze-till-modal.tsx @@ -200,7 +200,7 @@ export const SnoozeNotificationModal: FC = (props) => { )}
} - width="w-full" + optionsClassName="w-full" input >
diff --git a/web/components/pages/pages-list/list-item.tsx b/web/components/pages/pages-list/list-item.tsx index 99b50e3c0..960e222ce 100644 --- a/web/components/pages/pages-list/list-item.tsx +++ b/web/components/pages/pages-list/list-item.tsx @@ -235,7 +235,7 @@ export const PagesListItem: FC = observer(({ pageId, projectId } > - + {archived_at ? ( <> {userCanArchive && ( diff --git a/web/components/project/member-select.tsx b/web/components/project/member-select.tsx index e525bd6f5..e019a29e7 100644 --- a/web/components/project/member-select.tsx +++ b/web/components/project/member-select.tsx @@ -69,7 +69,6 @@ export const MemberSelect: React.FC = observer((props) => { ] } maxHeight="md" - width="w-full" onChange={onChange} disabled={isDisabled} /> diff --git a/web/components/project/send-project-invitation-modal.tsx b/web/components/project/send-project-invitation-modal.tsx index db7572dd9..b165a40ae 100644 --- a/web/components/project/send-project-invitation-modal.tsx +++ b/web/components/project/send-project-invitation-modal.tsx @@ -236,7 +236,7 @@ export const SendProjectInvitationModal: React.FC = observer((props) => { onChange(val); }} options={options} - width="w-full min-w-[12rem]" + optionsClassName="w-full" /> ); }} @@ -266,7 +266,7 @@ export const SendProjectInvitationModal: React.FC = observer((props) => {
} input - width="w-full" + optionsClassName="w-full" > {Object.entries(ROLE).map(([key, label]) => { if (parseInt(key) > (currentProjectRole ?? EUserProjectRoles.GUEST)) return null; diff --git a/web/components/states/create-state-modal.tsx b/web/components/states/create-state-modal.tsx index 95ceb894f..db91bb6b0 100644 --- a/web/components/states/create-state-modal.tsx +++ b/web/components/states/create-state-modal.tsx @@ -160,7 +160,7 @@ export const CreateStateModal: React.FC = observer((props) => { value={value} label={GROUP_CHOICES[value as keyof typeof GROUP_CHOICES]} onChange={onChange} - width="w-full" + optionsClassName="w-full" input > {Object.keys(GROUP_CHOICES).map((key) => ( diff --git a/web/components/views/view-list-item.tsx b/web/components/views/view-list-item.tsx index 1b04dbff0..8da507539 100644 --- a/web/components/views/view-list-item.tsx +++ b/web/components/views/view-list-item.tsx @@ -123,7 +123,7 @@ export const ProjectViewListItem: React.FC = observer((props) => { ))} - + {isEditingAllowed && ( <> = observer((props) => { } buttonClassName="!border-[0.5px] !border-custom-border-200 !shadow-none" input - width="w-full" + optionsClassName="w-full" > {ORGANIZATION_SIZE.map((item) => ( diff --git a/web/components/workspace/send-workspace-invitation-modal.tsx b/web/components/workspace/send-workspace-invitation-modal.tsx index 3fd818402..35b5963d0 100644 --- a/web/components/workspace/send-workspace-invitation-modal.tsx +++ b/web/components/workspace/send-workspace-invitation-modal.tsx @@ -165,7 +165,7 @@ export const SendWorkspaceInvitationModal: React.FC = observer((props) => value={value} label={{ROLE[value]}} onChange={onChange} - width="w-full" + optionsClassName="w-full" input > {Object.entries(ROLE).map(([key, value]) => { diff --git a/web/components/workspace/settings/workspace-details.tsx b/web/components/workspace/settings/workspace-details.tsx index a309012d1..3063855fd 100644 --- a/web/components/workspace/settings/workspace-details.tsx +++ b/web/components/workspace/settings/workspace-details.tsx @@ -247,7 +247,7 @@ export const WorkspaceDetails: FC = observer(() => { value={value} onChange={onChange} label={ORGANIZATION_SIZE.find((c) => c === value) ?? "Select organization size"} - width="w-full" + optionsClassName="w-full" buttonClassName="!border-[0.5px] !border-custom-border-200 !shadow-none" input disabled={!isAdmin} diff --git a/web/components/workspace/views/view-list-item.tsx b/web/components/workspace/views/view-list-item.tsx index 25be61a59..1d9289037 100644 --- a/web/components/workspace/views/view-list-item.tsx +++ b/web/components/workspace/views/view-list-item.tsx @@ -54,7 +54,7 @@ export const GlobalViewListItem: React.FC = observer((props) => {

{totalFilters} {totalFilters === 1 ? "filter" : "filters"}

- + { e.preventDefault(); diff --git a/web/pages/profile/index.tsx b/web/pages/profile/index.tsx index 88333388a..3174c53f3 100644 --- a/web/pages/profile/index.tsx +++ b/web/pages/profile/index.tsx @@ -284,7 +284,9 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => { ref={ref} hasError={Boolean(errors.email)} placeholder="Enter your email" - className={`w-full rounded-md cursor-not-allowed !bg-custom-background-80 ${errors.email ? "border-red-500" : ""}`} + className={`w-full rounded-md cursor-not-allowed !bg-custom-background-80 ${ + errors.email ? "border-red-500" : "" + }`} disabled /> )} @@ -306,7 +308,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => { label={value ? value.toString() : "Select your role"} buttonClassName={errors.role ? "border-red-500" : "border-none"} className="rounded-md border-[0.5px] !border-custom-border-200" - width="w-full" + optionsClassName="w-full" input > {USER_ROLES.map((item) => (