mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: state icon (#2678)
This commit is contained in:
parent
25f3a5b2e4
commit
1986c0dfd4
@ -29,7 +29,7 @@ export const RenderIssueState = observer(({ state }: { state: IIssueState }) =>
|
|||||||
return (
|
return (
|
||||||
<div className={`inline-flex items-center gap-x-1 rounded-full px-2 py-0.5 ${stateGroup.className || ``}`}>
|
<div className={`inline-flex items-center gap-x-1 rounded-full px-2 py-0.5 ${stateGroup.className || ``}`}>
|
||||||
<div className="flex-shrink-0 w-3 h-3 flex justify-center items-center overflow-hidden rounded-full">
|
<div className="flex-shrink-0 w-3 h-3 flex justify-center items-center overflow-hidden rounded-full">
|
||||||
<stateGroup.icon />
|
{/* <stateGroup.icon /> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs font-medium whitespace-nowrap">{state?.name}</div>
|
<div className="text-xs font-medium whitespace-nowrap">{state?.name}</div>
|
||||||
<div
|
<div
|
||||||
|
@ -77,7 +77,7 @@ export const NavbarIssueFilter = observer(() => {
|
|||||||
return {
|
return {
|
||||||
display: (
|
display: (
|
||||||
<span className="capitalize flex items-center gap-x-2">
|
<span className="capitalize flex items-center gap-x-2">
|
||||||
{stateGroup && <stateGroup.icon />}
|
{/* {stateGroup && <stateGroup.icon />} */}
|
||||||
{state.name}
|
{state.name}
|
||||||
</span>
|
</span>
|
||||||
),
|
),
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
// hooks
|
// hooks
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
|
// ui
|
||||||
|
import { StateGroupIcon } from "@plane/ui";
|
||||||
// icons
|
// icons
|
||||||
import { Icon } from "components/ui";
|
import { Icon } from "components/ui";
|
||||||
// helpers
|
// helpers
|
||||||
@ -63,7 +65,7 @@ export const PeekOverviewIssueProperties: React.FC<Props> = ({ issueDetails, mod
|
|||||||
{stateGroup && (
|
{stateGroup && (
|
||||||
<div className="inline-flex bg-custom-background-80 text-sm rounded px-2.5 py-0.5">
|
<div className="inline-flex bg-custom-background-80 text-sm rounded px-2.5 py-0.5">
|
||||||
<div className="flex items-center gap-1.5 text-left text-custom-text-100">
|
<div className="flex items-center gap-1.5 text-left text-custom-text-100">
|
||||||
<stateGroup.icon />
|
<StateGroupIcon stateGroup={state.group} color={state.color} />
|
||||||
{addSpaceIfCamelCase(state?.name ?? "")}
|
{addSpaceIfCamelCase(state?.name ?? "")}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// interfaces
|
// interfaces
|
||||||
import {
|
import {
|
||||||
IIssueBoardViews,
|
|
||||||
// priority
|
// priority
|
||||||
TIssuePriorityKey,
|
TIssuePriorityKey,
|
||||||
// state groups
|
// state groups
|
||||||
@ -8,14 +7,6 @@ import {
|
|||||||
IIssuePriorityFilters,
|
IIssuePriorityFilters,
|
||||||
IIssueGroup,
|
IIssueGroup,
|
||||||
} from "types/issue";
|
} from "types/issue";
|
||||||
// icons
|
|
||||||
import {
|
|
||||||
BacklogGroupIcon,
|
|
||||||
CancelledGroupIcon,
|
|
||||||
CompletedGroupIcon,
|
|
||||||
StartedGroupIcon,
|
|
||||||
UnstartedGroupIcon,
|
|
||||||
} from "@plane/ui";
|
|
||||||
|
|
||||||
// all issue views
|
// all issue views
|
||||||
export const issueViews: any = {
|
export const issueViews: any = {
|
||||||
@ -92,35 +83,30 @@ export const issueGroups: IIssueGroup[] = [
|
|||||||
title: "Backlog",
|
title: "Backlog",
|
||||||
color: "#d9d9d9",
|
color: "#d9d9d9",
|
||||||
className: `text-[#d9d9d9] bg-[#d9d9d9]/10`,
|
className: `text-[#d9d9d9] bg-[#d9d9d9]/10`,
|
||||||
icon: BacklogGroupIcon,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "unstarted",
|
key: "unstarted",
|
||||||
title: "Unstarted",
|
title: "Unstarted",
|
||||||
color: "#3f76ff",
|
color: "#3f76ff",
|
||||||
className: `text-[#3f76ff] bg-[#3f76ff]/10`,
|
className: `text-[#3f76ff] bg-[#3f76ff]/10`,
|
||||||
icon: UnstartedGroupIcon,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "started",
|
key: "started",
|
||||||
title: "Started",
|
title: "Started",
|
||||||
color: "#f59e0b",
|
color: "#f59e0b",
|
||||||
className: `text-[#f59e0b] bg-[#f59e0b]/10`,
|
className: `text-[#f59e0b] bg-[#f59e0b]/10`,
|
||||||
icon: StartedGroupIcon,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "completed",
|
key: "completed",
|
||||||
title: "Completed",
|
title: "Completed",
|
||||||
color: "#16a34a",
|
color: "#16a34a",
|
||||||
className: `text-[#16a34a] bg-[#16a34a]/10`,
|
className: `text-[#16a34a] bg-[#16a34a]/10`,
|
||||||
icon: CompletedGroupIcon,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "cancelled",
|
key: "cancelled",
|
||||||
title: "Cancelled",
|
title: "Cancelled",
|
||||||
color: "#dc2626",
|
color: "#dc2626",
|
||||||
className: `text-[#dc2626] bg-[#dc2626]/10`,
|
className: `text-[#dc2626] bg-[#dc2626]/10`,
|
||||||
icon: CancelledGroupIcon,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ export interface IIssueGroup {
|
|||||||
title: TIssueGroupTitle;
|
title: TIssueGroupTitle;
|
||||||
color: string;
|
color: string;
|
||||||
className: string;
|
className: string;
|
||||||
icon: React.FC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IIssue {
|
export interface IIssue {
|
||||||
@ -40,7 +39,12 @@ export interface IIssue {
|
|||||||
sequence_id: number;
|
sequence_id: number;
|
||||||
start_date: any;
|
start_date: any;
|
||||||
state: string;
|
state: string;
|
||||||
state_detail: any;
|
state_detail: {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
group: TIssueGroupKey;
|
||||||
|
color: string;
|
||||||
|
};
|
||||||
target_date: any;
|
target_date: any;
|
||||||
votes: IVote[];
|
votes: IVote[];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user