Skip to content

Commit

Permalink
Merge pull request #40 from Bahmni-HWC/GOK-309
Browse files Browse the repository at this point in the history
Add. Home button in inventory module
  • Loading branch information
riyaTw authored Aug 23, 2023
2 parents 5c15c65 + 7417501 commit 2f09a46
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/header/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@ import React from "react";
import { Header } from "carbon-components-react";
import styles from "./header.module.scss";
import { inventoryHeaderText } from "../../../constants";
import Home24 from "@carbon/icons-react/lib/home/24";
import { HeaderGlobalAction } from "carbon-components-react";

const InventoryHeader = () => {
const redirectToHome = () => {
window.location.href = "/bahmni/home";
};

return (
<Header className={styles.header} aria-label="inventory-header">
<HeaderGlobalAction
aria-label="Home"
className={styles.headerGlobalBarButton}
onClick={redirectToHome}
>
<Home24 />
</HeaderGlobalAction>
<div className={styles.headerText}>{inventoryHeaderText}</div>
</Header>
);
Expand Down
4 changes: 4 additions & 0 deletions src/components/header/header.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.headerGlobalBarButton:hover {
background-color: #004144;
}

.header {
background-color: #005d5d !important;
}
Expand Down

0 comments on commit 2f09a46

Please sign in to comment.