Skip to content

Commit 3c74f8e

Browse files
committed
Update How Two Col style variations are handled
1 parent 95f4682 commit 3c74f8e

File tree

4 files changed

+247
-255
lines changed

4 files changed

+247
-255
lines changed

components/containers/TwoColumn/TwoColumn.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Image from 'next/image';
22
import ButtonLink from '@/components/buttons/ButtonLink/ButtonLink';
33
import Container from '@/components/containers/Container/Container';
4-
import S from './styles';
4+
import * as TwoColumnStyles from './styles';
55

66
export default function TwoColumn({
77
image,
@@ -19,8 +19,33 @@ export default function TwoColumn({
1919
openNewTab,
2020
$contentType,
2121
}) {
22+
//Set Styles base don content type
23+
let S;
24+
switch ($contentType) {
25+
case 'our-process':
26+
S = TwoColumnStyles.OurProcess;
27+
case 'get-started':
28+
S = TwoColumnStyles.GetStarted;
29+
case 'our-purpose':
30+
S = TwoColumnStyles.OurPurpose;
31+
case 'our-background':
32+
S = TwoColumnStyles.OurBackground;
33+
case 'get-involved':
34+
S = TwoColumnStyles.GetInvolved;
35+
case 'non-profit':
36+
S = TwoColumnStyles.NonProfit;
37+
case 'wanna-learn-more':
38+
S = TwoColumnStyles.WannaLearnMore;
39+
case 'questions':
40+
S = TwoColumnStyles.QuestionsMore;
41+
case 'two-text-columns':
42+
S = TwoColumnStyles.TwoTextColumns;
43+
case 'second-text-column':
44+
S = TwoColumnStyles.SecondTextColumn;
45+
default:
46+
S = TwoColumnStyles.Base;
47+
}
2248
// Add rowOrder="row-reverse" prop to the component to reverse its order on desktop
23-
2449
return (
2550
<S.TwoColumnWrapper $color={color} $bgColor={bgColor}>
2651
<S.InnerContainer

components/containers/TwoColumn/addContentsCss.js

Lines changed: 0 additions & 216 deletions
This file was deleted.

0 commit comments

Comments
 (0)