-
-
Save 3ndrius/72ee66866406fba6b4b60b6dddc2241d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import CategoryCard from './../parts/CategoryCard'; | |
import CaptionWrap from '../parts/Caption'; | |
import Button from './../buttons/Button'; | |
import H1 from '../headers/H1'; | |
import ContainerCategory from './../parts/Contain'; | |
import Position from './../parts/PositionContainer'; | |
import { Link } from 'react-router-dom' | |
import Par from './../parts/Paragraph'; | |
export default function Category(props) { | |
console.log("Props category", props); | |
return ( | |
<ContainerCategory> | |
{props.category && props.category.map((item, index) => { | |
return( | |
<CategoryCard key={index} index={index + 1}> | |
<img src={item.metadata.img.url} alt="img" index={index + 1} /> | |
<CaptionWrap index={index + 1}> | |
<Position index={index + 1}> | |
<H1 isBig>{item.title}</H1> | |
<Par dangerouslySetInnerHTML={{__html:item.content}}></Par> | |
<Link to={'/' + item.slug}><Button >See more</Button> </Link> | |
</Position> | |
</CaptionWrap> | |
</CategoryCard> | |
) | |
})} | |
</ContainerCategory> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment