Change align prop
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Shahan Nedadahandeh 2022-08-11 21:41:14 -07:00
parent 29534e574b
commit ce302f6c03
Signed by: snedadah
GPG Key ID: 8638C7F917385B01
3 changed files with 9 additions and 13 deletions

View File

@ -8,15 +8,12 @@
padding: 0 15%; padding: 0 15%;
} }
.graphWrapper {
margin-top: calc(50rem / 16);
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.wrapper { .wrapper {
padding: 0 calc(20rem / 16); padding: 0 calc(20rem / 16);
} }
} }
.graphWrapper {
margin-top: calc(50rem / 16);
}

View File

@ -6,7 +6,7 @@ type ComponentWrapperProps = {
children: React.ReactNode; children: React.ReactNode;
heading: string; heading: string;
body: string; body: string;
rightAligned?: boolean; align?: "left" | "right";
noBackground?: boolean; noBackground?: boolean;
}; };
@ -14,14 +14,14 @@ export function SideComponentWrapper({
heading, heading,
body, body,
children, children,
rightAligned = false, align = "left",
noBackground = false, noBackground = false,
}: ComponentWrapperProps) { }: ComponentWrapperProps) {
return ( return (
<div <div
className={`${rightAligned ? styles.wrapperRight : styles.wrapperLeft} ${ className={`${
noBackground ? styles.noBackground : "" align === "right" ? styles.wrapperRight : styles.wrapperLeft
}`} } ${noBackground ? styles.noBackground : ""}`}
> >
<div className={styles.internalWrapper}> <div className={styles.internalWrapper}>
<h3>{heading}</h3> <h3>{heading}</h3>

View File

@ -53,7 +53,7 @@ export default function SamplePage() {
<SideComponentWrapper <SideComponentWrapper
heading="What program are you in?" heading="What program are you in?"
body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics." body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics."
rightAligned align="right"
> >
<BarGraphHorizontal <BarGraphHorizontal
className={styles.barGraphDemo} className={styles.barGraphDemo}
@ -91,7 +91,6 @@ export default function SamplePage() {
<SideComponentWrapper <SideComponentWrapper
heading="What program are you in?" heading="What program are you in?"
body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics." body="There are a total of 106 respondents of the CS Class Profile. Interestingly, there are a huge number of students that are just in CS, partially due to the overwhelming number of people in CS as seen in the total demographics."
rightAligned
> >
<BarGraphHorizontal <BarGraphHorizontal
className={styles.barGraphDemo} className={styles.barGraphDemo}