File tree Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Expand file tree Collapse file tree 2 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 2
2
background : linear-gradient (to top , var (--color-canvas-default ), transparent );
3
3
}
4
4
5
+ .removeHoverEvents {
6
+ pointer-events : none ;
7
+ }
8
+
5
9
/* Because of the sticky header */
6
10
.hashAnchor {
7
11
& :target {
Original file line number Diff line number Diff line change @@ -108,22 +108,29 @@ export const LearningTrack = ({ track }: Props) => {
108
108
> </ ActionList >
109
109
</ div >
110
110
) }
111
- { ( track ?. guides ?. length || 0 ) > numVisible ? (
111
+ {
112
112
< button
113
- className = "Box-footer btn-link border-top-0 position-relative text-center text-bold color-fg-accent pt-1 pb-3 col-12"
113
+ className = {
114
+ 'Box-footer btn-link border-top-0 position-relative text-center text-bold color-fg-accent pt-1 pb-3 col-12 ' +
115
+ ( ( track ?. guides ?. length || 0 ) <= numVisible && cx ( styles . removeHoverEvents ) )
116
+ }
114
117
onClick = { showAll }
115
118
>
116
- < div
117
- className = { cx ( 'position-absolute left-0 right-0 py-5' , styles . fadeBottom ) }
118
- style = { { bottom : '50px' } }
119
- > </ div >
120
- < span >
121
- Show { ( track ?. guides ?. length || 0 ) - numVisible } { t ( `more_guides` ) }
122
- </ span >
119
+ { ( track ?. guides ?. length || 0 ) > numVisible ? (
120
+ < div >
121
+ < div
122
+ className = { cx ( 'position-absolute left-0 right-0 py-5' , styles . fadeBottom ) }
123
+ style = { { bottom : '50px' } }
124
+ />
125
+ < span >
126
+ Show { ( track ?. guides ?. length || 0 ) - numVisible } { t ( `more_guides` ) }
127
+ </ span >
128
+ </ div >
129
+ ) : (
130
+ < span className = "color-fg-default" > All guides shown</ span >
131
+ ) }
123
132
</ button >
124
- ) : (
125
- < div />
126
- ) }
133
+ }
127
134
</ div >
128
135
</ div >
129
136
)
You can’t perform that action at this time.
0 commit comments