Standarding priority icons across the platform (#2776)
This commit is contained in:
parent
002dc7a5f3
commit
2d1536e44d
7 changed files with 46 additions and 114 deletions
|
|
@ -32,7 +32,7 @@ export const PrioritySelect: React.FC<Props> = ({
|
|||
optionsClassName = "",
|
||||
placement,
|
||||
showTitle = false,
|
||||
highlightUrgentPriority = true,
|
||||
//highlightUrgentPriority = true,
|
||||
hideDropdownArrow = false,
|
||||
disabled = false,
|
||||
}) => {
|
||||
|
|
@ -74,7 +74,7 @@ export const PrioritySelect: React.FC<Props> = ({
|
|||
<div className="flex items-center gap-2">
|
||||
<PriorityIcon
|
||||
priority={value}
|
||||
className={`h-3.5 w-3.5 ${value === "urgent" ? (highlightUrgentPriority ? "text-white" : "text-red-500") : ""}`}
|
||||
className={`h-3.5 w-3.5`}
|
||||
/>
|
||||
{showTitle && <span className="capitalize text-xs">{value}</span>}
|
||||
</div>
|
||||
|
|
@ -93,19 +93,7 @@ export const PrioritySelect: React.FC<Props> = ({
|
|||
<button
|
||||
ref={setReferenceElement}
|
||||
type="button"
|
||||
className={`flex items-center justify-between gap-1 h-full w-full text-xs rounded border-[0.5px] ${
|
||||
value === "urgent"
|
||||
? highlightUrgentPriority
|
||||
? "border-red-500/20 bg-red-500"
|
||||
: "border-custom-border-300"
|
||||
: "border-custom-border-300"
|
||||
} ${
|
||||
!disabled
|
||||
? `${
|
||||
value === "urgent" && highlightUrgentPriority ? "hover:bg-red-400" : "hover:bg-custom-background-80"
|
||||
}`
|
||||
: ""
|
||||
} ${disabled ? "cursor-not-allowed text-custom-text-200" : "cursor-pointer"} ${buttonClassName}`}
|
||||
className={`flex items-center justify-between gap-1 h-full w-full !p-0 ${disabled ? "cursor-not-allowed text-custom-text-200" : "cursor-pointer"} ${buttonClassName}`}
|
||||
>
|
||||
{label}
|
||||
{!hideDropdownArrow && !disabled && <ChevronDown className="h-2.5 w-2.5" aria-hidden="true" />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue