Skip to content

Commit

Permalink
Fixed search button width (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
wachiya authored and joeldenning committed Sep 25, 2019
1 parent fc47c8e commit 1a902e3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
22 changes: 19 additions & 3 deletions src/dashboard/home-dashboard.component.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
.homeDashboard {
height: calc(100vh - var(--omrs-topnav-height) - 2rem);
height: calc(100vh - var(--omrs-topnav-height) - 10rem);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0 auto;
}

.mainSection {
min-height: 60vh;
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
}

.label {
color: var(--omrs-color-interaction);
margin-left: 0.25rem;
text-align: center;
}

.logoSection {
Expand All @@ -23,3 +25,17 @@
align-items: center;
height: 100%;
}

@media only screen and (min-width: 720px) {
.dashboardLink {
width: 40%;
justify-content: center;
}
}

@media only screen and (max-width: 720px) {
.dashboardLink {
width: 80%;
justify-content: center;
}
}
32 changes: 17 additions & 15 deletions src/dashboard/home-dashboard.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,28 @@ import { UserHasAccessReact } from "@openmrs/esm-api";

export default function HomeDashboard(props: HomeDashboardProps) {
return (
<div className={styles.homeDashboard}>
<section className={styles.mainSection}>
<UserHasAccessReact privilege="View Patients">
<Link
to={props.match.url + "/patient-search"}
className="omrs-link omrs-outlined-action omrs-rounded"
>
<svg className="omrs-icon" fill="var(--omrs-color-interaction)">
<use xlinkHref="#omrs-icon-search" />
</svg>
<span className={styles.label}>Search for patient</span>
</Link>
</UserHasAccessReact>
</section>
<>
<div className={styles.homeDashboard}>
<section className={styles.mainSection}>
<UserHasAccessReact privilege="View Patients">
<Link
to={props.match.url + "/patient-search"}
className={`omrs-link omrs-outlined-action omrs-rounded ${styles.dashboardLink}`}
>
<svg className="omrs-icon" fill="var(--omrs-color-interaction)">
<use xlinkHref="#omrs-icon-search" />
</svg>
<span className={styles.label}>Search for patient</span>
</Link>
</UserHasAccessReact>
</section>
</div>
<section className={styles.logoSection}>
<svg>
<use xlinkHref="#omrs-logo-full-mono" />
</svg>
</section>
</div>
</>
);
}

Expand Down

0 comments on commit 1a902e3

Please sign in to comment.