blob: 272a3970bc244525c8ae2474bcf656dbdd3db49f (
plain)
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
|
# frozen_string_literal: true
module MilestonesHelper
def milestone_header_class(primary, issuables)
header_color = milestone_header_color(primary: primary)
header_border = milestone_header_border(issuables)
"#{header_color} #{header_border} gl-display-flex"
end
def milestone_counter_class(primary)
primary ? 'gl-text-white' : 'gl-text-gray-500'
end
private
def milestone_header_color(primary: false)
return '' unless primary
'gl-bg-blue-500 gl-text-white'
end
def milestone_header_border(issuables)
issuables.empty? ? 'gl-border-bottom-0 gl-rounded-base' : ''
end
end
|