forked from github/plane
fix: state icon color on group titles (#1435)
This commit is contained in:
parent
c3fe221e7a
commit
3906503c1b
@ -57,18 +57,6 @@ export const BoardHeader: React.FC<Props> = ({
|
|||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
|
||||||
let bgColor = "#000000";
|
|
||||||
if (selectedGroup === "state") bgColor = currentState?.color ?? "#000000";
|
|
||||||
|
|
||||||
if (selectedGroup === "priority")
|
|
||||||
groupTitle === "high"
|
|
||||||
? (bgColor = "#dc2626")
|
|
||||||
: groupTitle === "medium"
|
|
||||||
? (bgColor = "#f97316")
|
|
||||||
: groupTitle === "low"
|
|
||||||
? (bgColor = "#22c55e")
|
|
||||||
: (bgColor = "#ff0000");
|
|
||||||
|
|
||||||
const getGroupTitle = () => {
|
const getGroupTitle = () => {
|
||||||
let title = addSpaceIfCamelCase(groupTitle);
|
let title = addSpaceIfCamelCase(groupTitle);
|
||||||
|
|
||||||
@ -96,7 +84,8 @@ export const BoardHeader: React.FC<Props> = ({
|
|||||||
|
|
||||||
switch (selectedGroup) {
|
switch (selectedGroup) {
|
||||||
case "state":
|
case "state":
|
||||||
icon = currentState && getStateGroupIcon(currentState.group, "16", "16", bgColor);
|
icon =
|
||||||
|
currentState && getStateGroupIcon(currentState.group, "16", "16", currentState.color);
|
||||||
break;
|
break;
|
||||||
case "priority":
|
case "priority":
|
||||||
icon = getPriorityIcon(groupTitle, "text-lg");
|
icon = getPriorityIcon(groupTitle, "text-lg");
|
||||||
|
@ -33,7 +33,6 @@ import { PROJECT_ISSUE_LABELS, PROJECT_MEMBERS } from "constants/fetch-keys";
|
|||||||
type Props = {
|
type Props = {
|
||||||
type?: "issue" | "cycle" | "module";
|
type?: "issue" | "cycle" | "module";
|
||||||
currentState?: IState | null;
|
currentState?: IState | null;
|
||||||
bgColor?: string;
|
|
||||||
groupTitle: string;
|
groupTitle: string;
|
||||||
groupedByIssues: {
|
groupedByIssues: {
|
||||||
[key: string]: IIssue[];
|
[key: string]: IIssue[];
|
||||||
@ -53,7 +52,6 @@ type Props = {
|
|||||||
export const SingleList: React.FC<Props> = ({
|
export const SingleList: React.FC<Props> = ({
|
||||||
type,
|
type,
|
||||||
currentState,
|
currentState,
|
||||||
bgColor,
|
|
||||||
groupTitle,
|
groupTitle,
|
||||||
groupedByIssues,
|
groupedByIssues,
|
||||||
selectedGroup,
|
selectedGroup,
|
||||||
@ -113,7 +111,8 @@ export const SingleList: React.FC<Props> = ({
|
|||||||
|
|
||||||
switch (selectedGroup) {
|
switch (selectedGroup) {
|
||||||
case "state":
|
case "state":
|
||||||
icon = currentState && getStateGroupIcon(currentState.group, "16", "16", bgColor);
|
icon =
|
||||||
|
currentState && getStateGroupIcon(currentState.group, "16", "16", currentState.color);
|
||||||
break;
|
break;
|
||||||
case "priority":
|
case "priority":
|
||||||
icon = getPriorityIcon(groupTitle, "text-lg");
|
icon = getPriorityIcon(groupTitle, "text-lg");
|
||||||
|
Loading…
Reference in New Issue
Block a user