Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting the margin between the icon and page labels within the header #18

Merged
merged 12 commits into from
Oct 18, 2023
2 changes: 1 addition & 1 deletion src/components/header/home-header.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const HomeHeader: React.FC<HomeHeaderProps> = ({
<>
<div className={styles.header}>
<div className={styles["left-justified-items"]}>
<HomeIllustration icon={<Events />} />
<HomeIllustration icon={icon} />
<div className={styles["page-labels"]}>
<p>{t("home", "Home")}</p>
<p className={styles["page-name"]}>{headerTitle}</p>
Expand Down
25 changes: 24 additions & 1 deletion src/components/header/home-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
flex-direction: row;
align-items: center;
cursor: pointer;
margin-left: 0.75rem;
}

.right-justified-items {
@include type.type-style('body-compact-02');
color: colors.$gray-70;
margin: 0.5rem;
margin: 1rem;
}

.page-name {
Expand All @@ -32,6 +33,7 @@
.page-labels {
p:first-of-type {
margin-bottom: 0.25rem;
margin-left: 1rem;
}
}

Expand All @@ -42,6 +44,14 @@
margin-right: 1rem;
}

.clinic {
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 1rem;
margin-right: 2rem;
}

.value {
margin-left: 0.25rem;
}
Expand Down Expand Up @@ -69,3 +79,16 @@
left: -10.15rem;
}
}

svg.iconOverrides {
width: 72px !important;
height: 72px !important;
fill: var(--brand-03);
}

.svgContainer svg {
width: 72px;
height: 72px;
fill: var(--brand-03);
}

6 changes: 5 additions & 1 deletion src/components/header/home-illustration.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export interface HomeIllustrationProps {
}

export const HomeIllustration: React.FC<HomeIllustrationProps> = ({ icon }) => {
return <div className={styles.svgContainer}>{icon}</div>;
return (
<div className={styles.svgContainer}>
<div className={styles.iconOverrides}>{icon}</div>
</div>
);
};

export default HomeIllustration;
7 changes: 2 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ config.overrides.resolve = {
extensions: [".tsx", ".ts", ".jsx", ".js", ".scss"],
alias: {
"@openmrs/esm-framework": "@openmrs/esm-framework/src/internal",
"@ugandaemr/esm-ugandaemr-commons-lib": path.resolve(
__dirname,
"./src/index"
),
"@ugandaemr/esm-ugandaemr-commons-lib": "@ugandaemr/esm-ugandaemr-commons-lib/src/index",
"@openmrs/openmrs-form-engine-lib": "@openmrs/openmrs-form-engine-lib/src/index",
},
};
module.exports = config;
module.exports = config;