From 8296f29f9d0e95ba07b1f8335ad4ca9491dec594 Mon Sep 17 00:00:00 2001 From: Giovanni Bombassaro Date: Tue, 5 Jan 2021 12:50:45 -0300 Subject: [PATCH] Adiciona props id no Block | Adiciona id no bloco relacionadas --- components/Block/index.js | 9 ++++++--- components/Templates/Related.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/Block/index.js b/components/Block/index.js index 64ad5a52f..975ec75d7 100644 --- a/components/Block/index.js +++ b/components/Block/index.js @@ -1,11 +1,12 @@ import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; -import colors from '../../styles/variables/colors.json' + +import colors from '../../styles/variables/colors.json'; const Block = (props) => { - const {children, xs, sm, md, lg, xl, onClick} = props; + const {children, xs, sm, md, lg, xl, onClick, id} = props; const defProps = (prefix, props) => { @@ -60,7 +61,8 @@ const Block = (props) => { const classProps = { className: classnames(dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block', children, - onClick + onClick, + id }; return
; }; @@ -116,6 +118,7 @@ Block.propTypes = { onClick: PropTypes.func, w: PropTypes.string, h: PropTypes.string, + id: PropTypes.string }; export default Block; \ No newline at end of file diff --git a/components/Templates/Related.js b/components/Templates/Related.js index 53993c9b0..155c2e6e7 100644 --- a/components/Templates/Related.js +++ b/components/Templates/Related.js @@ -2,15 +2,15 @@ import {map} from 'lodash'; import PropTypes from 'prop-types'; import React from 'react'; +import colors from '../../styles/variables/colors.json'; import Block from '../Block'; import Teaser from '../Teasers'; -import colors from '../../styles/variables/colors.json' const Related = ({items, domain, lazy, ReadMore, status, theme}) => { const {activeColor} = theme; const propsContainer = {custom: 'templates-related-news', align: 'col left', w: '100p'}; return ( - + {map(items, (item, key) =>