generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
1 deletion.
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,24 @@ | ||
import React from "react"; | ||
import { Switcher } from "@carbon/react"; | ||
import { Help } from "@carbon/react/icons"; | ||
import styles from "./navbar.scss"; | ||
|
||
const HelpMenu: React.FC = () => { | ||
const openHelpLink = () => { | ||
const currentUrl = new URL(window.location.href); | ||
currentUrl.port = "81"; | ||
currentUrl.pathname = "/doku.php"; | ||
window.open(currentUrl.toString(), "_blank"); | ||
}; | ||
|
||
return ( | ||
<div className={styles.switcherContainer} onClick={openHelpLink}> | ||
Check failure on line 15 in src/views/navbar/help-button.component.tsx GitHub Actions / build
|
||
<Switcher aria-label="Switcher Container"> | ||
<Help size={20} /> | ||
<p>Help</p> | ||
</Switcher> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HelpMenu; |
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