Skip to content

Commit

Permalink
GOK-309 | Add. Home button in inventory module | [Sweety/Riya]
Browse files Browse the repository at this point in the history
  • Loading branch information
riyaTw committed Aug 23, 2023
1 parent 5c15c65 commit 7417501
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
@@ -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>
);
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;
}

0 comments on commit 7417501

Please sign in to comment.