Skip to content

Commit bd33c7c

Browse files
committed
Migrated Wrapper styling to css modules
1 parent c4b35c5 commit bd33c7c

4 files changed

Lines changed: 13 additions & 16 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.wrapper {
2+
padding: 1rem 0;
3+
4+
&.primary__accent {
5+
background-color: var(--color-primary-accent);
6+
}
7+
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import S from './styles';
1+
import styles from './Wrapper.module.scss';
22

33
export default function Wrapper({ customClass, children }) {
4-
return <S.Wrapper $colorVarient={customClass}>{children}</S.Wrapper>;
4+
const wrapperClass = customClass
5+
? `${styles.wrapper} ${styles[customClass]}`
6+
: styles.wrapper;
7+
return <div className={wrapperClass}>{children}</div>;
58
}

components/containers/Wrapper/styles.js

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

styles/globals.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
--color-grey: #d9d9d9;
88
--color-white: #ffffff;
99
--color-light-bg: #8cd5e8;
10+
--color-primary-accent: #ffcc4c;
1011
--color-primary-content: #292929;
1112
--color-transparent: transparent;
1213
--color-box-shadow: rgba(0, 0, 0, 0.08);

0 commit comments

Comments
 (0)