mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
23 lines
837 B
TypeScript
23 lines
837 B
TypeScript
export const getPriorityIcon = (priority: string | null, className?: string) => {
|
|
if (!className || className === "") className = "text-xs flex items-center";
|
|
|
|
priority = priority?.toLowerCase() ?? null;
|
|
|
|
switch (priority) {
|
|
case "urgent":
|
|
return <span className={`material-symbols-rounded ${className}`}>error</span>;
|
|
case "high":
|
|
return <span className={`material-symbols-rounded ${className}`}>signal_cellular_alt</span>;
|
|
case "medium":
|
|
return (
|
|
<span className={`material-symbols-rounded ${className}`}>signal_cellular_alt_2_bar</span>
|
|
);
|
|
case "low":
|
|
return (
|
|
<span className={`material-symbols-rounded ${className}`}>signal_cellular_alt_1_bar</span>
|
|
);
|
|
default:
|
|
return <span className={`material-symbols-rounded ${className}`}>block</span>;
|
|
}
|
|
};
|