Skip to content

Commit 239d1a3

Browse files
committed
Use @emotion/styled to create StyledCard.
1 parent e0dd6fd commit 239d1a3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* External dependencies
3+
*/
4+
import { Card } from '@wordpress/components';
5+
import styled from '@emotion/styled';
6+
7+
/**
8+
* Internal dependencies
9+
*/
10+
import breakpoints from '../../utils/breakpoint-values';
11+
12+
const StyledCard = styled( Card )`
13+
.components-flex {
14+
flex-direction: column;
15+
align-items: flex-end;
16+
17+
@media ( min-width: ${ breakpoints.large } ) {
18+
flex-direction: row;
19+
align-items: center;
20+
}
21+
22+
.motivation-text {
23+
margin: calc( var( --main-gap ) * 2 );
24+
25+
.title {
26+
margin-bottom: calc( var( --main-gap ) / 2 );
27+
}
28+
29+
.description {
30+
margin-bottom: var( --main-gap );
31+
}
32+
}
33+
34+
.motivation-image {
35+
text-align: right;
36+
margin-left: calc( var( --main-gap ) * 2 );
37+
margin-bottom: -4px;
38+
39+
@media ( min-width: ${ breakpoints.large } ) {
40+
margin-top: calc( var( --main-gap ) * 1.5 );
41+
}
42+
43+
svg {
44+
width: 100%;
45+
height: 100%;
46+
}
47+
}
48+
}
49+
`;
50+
51+
export default StyledCard;

0 commit comments

Comments
 (0)