File tree Expand file tree Collapse file tree 4 files changed +15
-37
lines changed Expand file tree Collapse file tree 4 files changed +15
-37
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ const BlogPostsContainer = ({
32
32
< RevealContentContainer >
33
33
< div className = { styles . blogContainer } >
34
34
{ heading ? (
35
- < Title customClass = ' blogTitle' title = { heading } />
35
+ < Title blogTitle title = { heading } />
36
36
) : tag ? (
37
- < Title customClass = ' blogTitle' title = { tagToHeading [ tag ] } />
37
+ < Title blogTitle title = { tagToHeading [ tag ] } />
38
38
) : null }
39
39
{
40
40
// put in rows of 3 if more than 3 posts (for swipable cards)
Original file line number Diff line number Diff line change 1
- // import styles from '@/styles/Title.module.scss';
2
1
import styled from 'styled-components' ;
3
2
4
3
export const TitleStyle = styled . h2 `
5
- color: red;
4
+ ${ props =>
5
+ props . blogTitle &&
6
+ `
7
+ align-self: flex-start;
8
+ margin: 0 auto 1rem;
9
+ width: 90%;
10
+ max-width: $large-desktop-breakpoint;
11
+ min-height: 5rem;
12
+ color: black;
13
+ ` } ;
6
14
` ;
7
15
8
- const Title = ( { title } ) => {
9
- return (
10
- < div >
11
- < TitleStyle > { title } </ TitleStyle >
12
- </ div >
13
- ) ;
16
+ const Title = ( { title, blogTitle } ) => {
17
+ return < TitleStyle blogTitle = { blogTitle } > { title } </ TitleStyle > ;
14
18
} ;
15
19
16
20
export default Title ;
17
-
18
- // const Title = ({ title, customClass }) => {
19
- // return (
20
- // <h2
21
- // className={
22
- // customClass ? `${styles.title} ${styles[customClass]}` : styles.title
23
- // }
24
- // >
25
- // {title}
26
- // </h2>
27
- // );
28
- // };
29
-
30
- // export default Title;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export default function Blog({ posts }) {
28
28
return (
29
29
< >
30
30
< div className = { styles . blogSearch } >
31
- < Title customClass = ' blogTitle' title = { ! searchTerm && 'Latest Posts' } />
31
+ < Title blogTitle title = { ! searchTerm && 'Latest Posts' } />
32
32
< SearchBar setSearchTerm = { setSearchTerm } />
33
33
</ div >
34
34
< BlogPostsContainer { ...filteredData } />
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments