File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ const BlogPostsContainer = ({
3232 < RevealContentContainer >
3333 < div className = { styles . blogContainer } >
3434 { heading ? (
35- < Title customClass = ' blogTitle' title = { heading } />
35+ < Title blogTitle title = { heading } />
3636 ) : tag ? (
37- < Title customClass = ' blogTitle' title = { tagToHeading [ tag ] } />
37+ < Title blogTitle title = { tagToHeading [ tag ] } />
3838 ) : null }
3939 {
4040 // 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';
21import styled from 'styled-components' ;
32
43export 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+ ` } ;
614` ;
715
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 > ;
1418} ;
1519
1620export 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 }) {
2828 return (
2929 < >
3030 < div className = { styles . blogSearch } >
31- < Title customClass = ' blogTitle' title = { ! searchTerm && 'Latest Posts' } />
31+ < Title blogTitle title = { ! searchTerm && 'Latest Posts' } />
3232 < SearchBar setSearchTerm = { setSearchTerm } />
3333 </ div >
3434 < BlogPostsContainer { ...filteredData } />
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments