Skip to content

Commit 35d37d6

Browse files
committed
add RowAlignLeft Component
1 parent dc84557 commit 35d37d6

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

components/containers/Row/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import S from './styles';
22

3-
export default function Row({ customClass, children, styles }) {
4-
return (
5-
<S.Row $alignment={customClass} style={styles}>
6-
{children}
7-
</S.Row>
8-
);
3+
export function Row({ customClass, children, styles }) {
4+
return <S.Row style={styles}>{children}</S.Row>;
5+
}
6+
7+
export function RowAlignLeft({ customClass, children, styles }) {
8+
return <S.RowAlignLeft style={styles}>{children}</S.RowAlignLeft>;
99
}

components/containers/Row/styles.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ const Row = styled.div`
99
${m.desktopBreakpointMinus(css`
1010
justify-content: space-between;
1111
`)}
12-
13-
//check props to inject alignment css
14-
${props => (props.$alignment === 'align__left' ? AlignLeft : '')}
1512
`;
1613

17-
const AlignLeft = css`
18-
justify-content: left !important;
14+
const RowAlignLeft = styled.div`
15+
display: flex;
16+
flex-wrap: wrap;
17+
justify-content: left;
1918
`;
2019

21-
export default { Row };
20+
export default { Row, RowAlignLeft };

pages/about.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { OurGoalsCardsColumns } from '@/components/containers/CardColumns/OurGoa
1010
import Title from '@/components/snippets/Title';
1111
import Wrapper from '@/components/containers/Wrapper';
1212
import Container from '@/components/containers/Container';
13-
import Row from '@/components/containers/Row';
13+
import { Row, RowAlignLeft } from '@/components/containers/Row';
1414
import Member from '@/components/containers/Member';
1515
import { whoWeAre } from '@/utils/about';
1616

@@ -233,7 +233,7 @@ export default function AboutUs() {
233233
<Wrapper customClass='primary__accent'>
234234
<Container>
235235
<Title title='Who we are' />
236-
<Row customClass='align__left'>
236+
<RowAlignLeft>
237237
{whoWeAre.map(_ => {
238238
return (
239239
<Member
@@ -248,7 +248,7 @@ export default function AboutUs() {
248248
/>
249249
);
250250
})}
251-
</Row>
251+
</RowAlignLeft>
252252
</Container>
253253
</Wrapper>
254254
</RevealContentContainer>

0 commit comments

Comments
 (0)