fix: sidebar cycle and module select (#2056)

This commit is contained in:
Aaryan Khandelwal 2023-09-01 20:54:14 +05:30 committed by GitHub
parent a6cd0809fa
commit 0196fee7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 34 deletions

View File

@ -124,7 +124,7 @@ export const SidebarBlockedSelect: React.FC<Props> = ({
</div>
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 ${
className={`bg-custom-background-80 text-xs text-custom-text-200 rounded px-2.5 py-0.5 ${
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-custom-background-80"
}`}
onClick={() => setIsBlockedModalOpen(true)}

View File

@ -126,7 +126,7 @@ export const SidebarBlockerSelect: React.FC<Props> = ({
</div>
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 ${
className={`bg-custom-background-80 text-xs text-custom-text-200 rounded px-2.5 py-0.5 ${
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-custom-background-80"
}`}
onClick={() => setIsBlockerModalOpen(true)}

View File

@ -62,23 +62,27 @@ export const SidebarCycleSelect: React.FC<Props> = ({
return (
<CustomSelect
customButton={
<Tooltip
position="left"
tooltipContent={`${issueCycle ? issueCycle.cycle_detail.name : "No cycle"}`}
>
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 w-full flex ${
disabled ? "cursor-not-allowed" : ""
}`}
<div>
<Tooltip
position="left"
tooltipContent={`${issueCycle ? issueCycle.cycle_detail.name : "No cycle"}`}
>
<span
className={`truncate ${issueCycle ? "text-custom-text-100" : "text-custom-text-200"}`}
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 w-full flex ${
disabled ? "cursor-not-allowed" : ""
}`}
>
{issueCycle ? issueCycle.cycle_detail.name : "No cycle"}
</span>
</button>
</Tooltip>
<span
className={`truncate ${
issueCycle ? "text-custom-text-100" : "text-custom-text-200"
}`}
>
{issueCycle ? issueCycle.cycle_detail.name : "No cycle"}
</span>
</button>
</Tooltip>
</div>
}
value={issueCycle ? issueCycle.cycle_detail.id : null}
onChange={(value: any) => {

View File

@ -56,27 +56,29 @@ export const SidebarModuleSelect: React.FC<Props> = ({
return (
<CustomSelect
customButton={
<Tooltip
position="left"
tooltipContent={`${
modules?.find((m) => m.id === issueModule?.module)?.name ?? "No module"
}`}
>
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 w-full flex ${
disabled ? "cursor-not-allowed" : ""
<div>
<Tooltip
position="left"
tooltipContent={`${
modules?.find((m) => m.id === issueModule?.module)?.name ?? "No module"
}`}
>
<span
className={`truncate ${
issueModule ? "text-custom-text-100" : "text-custom-text-200"
<button
type="button"
className={`bg-custom-background-80 text-xs rounded px-2.5 py-0.5 w-full flex ${
disabled ? "cursor-not-allowed" : ""
}`}
>
{modules?.find((m) => m.id === issueModule?.module)?.name ?? "No module"}
</span>
</button>
</Tooltip>
<span
className={`truncate ${
issueModule ? "text-custom-text-100" : "text-custom-text-200"
}`}
>
{modules?.find((m) => m.id === issueModule?.module)?.name ?? "No module"}
</span>
</button>
</Tooltip>
</div>
}
value={issueModule ? issueModule.module_detail?.id : null}
onChange={(value: any) => {