-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-refactor: new file for navigation buttons
-fix: render modals in normal mode -style: make modal styles global
- Loading branch information
Showing
3 changed files
with
152 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import { ICONS } from '../icon'; | ||
|
||
export const NavigationButtons = () => { | ||
return ( | ||
<div className="navigation-buttons"> | ||
<div className="navigation-button-container split navigation-button-genome"> | ||
<button | ||
className="navigation-button split-left" | ||
tabIndex={1} | ||
onClick={() => { | ||
setTimeout( | ||
() => document.getElementById('gosling-panel')?.scrollTo({ top: 0, behavior: 'smooth' }), | ||
0 | ||
); | ||
}} | ||
> | ||
Genome View | ||
</button> | ||
<button | ||
className="navigation-button split-right" | ||
tabIndex={1} | ||
data-bs-toggle="modal" | ||
data-bs-target="#genome-view-modal" | ||
> | ||
<svg className="button question-mark" viewBox={ICONS.QUESTION_CIRCLE_FILL.viewBox}> | ||
<title>Question Mark</title> | ||
{ICONS.QUESTION_CIRCLE_FILL.path.map(p => ( | ||
<path fill="currentColor" key={p} d={p} /> | ||
))} | ||
</svg> | ||
</button> | ||
</div> | ||
<div className="navigation-button-container split navigation-button-variant"> | ||
<button | ||
className="navigation-button split-left" | ||
tabIndex={1} | ||
onClick={() => { | ||
setTimeout(() => { | ||
document.getElementById('variant-view')?.scrollIntoView({ | ||
block: 'start', | ||
inline: 'nearest', | ||
behavior: 'smooth' | ||
}), | ||
0; | ||
}); | ||
}} | ||
> | ||
Variant View | ||
</button> | ||
<button | ||
className="navigation-button split-right" | ||
tabIndex={1} | ||
data-bs-toggle="modal" | ||
data-bs-target="#variant-view-modal" | ||
> | ||
<svg className="button question-mark" viewBox={ICONS.QUESTION_CIRCLE_FILL.viewBox}> | ||
<title>Question Mark</title> | ||
{ICONS.QUESTION_CIRCLE_FILL.path.map(p => ( | ||
<path fill="currentColor" key={p} d={p} /> | ||
))} | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; |