mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Experiment: unhide header when clicking on timeline items
This commit is contained in:
parent
95bf9e183e
commit
c950a6552c
1 changed files with 11 additions and 0 deletions
|
@ -388,6 +388,17 @@ function Timeline({
|
||||||
dotRef.current = node;
|
dotRef.current = node;
|
||||||
}}
|
}}
|
||||||
tabIndex="-1"
|
tabIndex="-1"
|
||||||
|
onClick={(e) => {
|
||||||
|
// If click on timeline item, unhide header
|
||||||
|
if (
|
||||||
|
headerRef.current &&
|
||||||
|
e.target.closest('.timeline-item, .timeline-item-alt')
|
||||||
|
) {
|
||||||
|
setTimeout(() => {
|
||||||
|
headerRef.current.hidden = false;
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div class="timeline-deck deck">
|
<div class="timeline-deck deck">
|
||||||
<header
|
<header
|
||||||
|
|
Loading…
Reference in a new issue