-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroadmapHelpers.js
More file actions
61 lines (53 loc) · 1.58 KB
/
roadmapHelpers.js
File metadata and controls
61 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const STATUS_COLORS = {
Planned: 'blue',
'In Progress': 'orange',
Completed: 'green',
'On Hold': 'red',
};
const PRIORITY_COLORS = {
High: 'red',
Medium: 'yellow',
Low: 'green',
};
// Define explicit styles so Tailwind JIT can detect them
const BADGE_STYLES = {
blue: 'bg-blue-500/20 border border-blue-500/50 text-blue-300',
orange: 'bg-orange-500/20 border border-orange-500/50 text-orange-300',
green: 'bg-green-500/20 border border-green-500/50 text-green-300',
red: 'bg-red-500/20 border border-red-500/50 text-red-300',
yellow: 'bg-yellow-500/20 border border-yellow-500/50 text-yellow-300',
gray: 'bg-gray-500/20 border border-gray-500/50 text-gray-300',
};
const getBadgeStyle = (color) => {
return BADGE_STYLES[color] || BADGE_STYLES['gray'];
};
const getStatusClasses = (status) => {
const color = STATUS_COLORS[status] || 'gray';
return getBadgeStyle(color);
};
const getPriorityClasses = (priority) => {
const color = PRIORITY_COLORS[priority] || 'gray';
return getBadgeStyle(color);
};
const getOnlyBgStatusColor = (status) => {
const color = STATUS_COLORS[status] || 'gray';
// Return explicit classes for JIT
const bgColors = {
blue: 'bg-blue-500',
orange: 'bg-orange-500',
green: 'bg-green-500',
red: 'bg-red-500',
yellow: 'bg-yellow-500',
gray: 'bg-gray-500',
};
return bgColors[color] || 'bg-gray-500';
};
const statusTextColor = (status) => {
return ''; // Text color is now handled in getStatusClasses/getPriorityClasses
};
export {
getStatusClasses,
getPriorityClasses,
getOnlyBgStatusColor,
statusTextColor,
};