Skip to content

Commit

Permalink
Adiciona props id no Block | Adiciona id no bloco relacionadas
Browse files Browse the repository at this point in the history
  • Loading branch information
gbombassaro committed Jan 5, 2021
1 parent a116a78 commit 8296f29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions components/Block/index.js
Original file line number Diff line number Diff line change
@@ -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) => {

Expand Down Expand Up @@ -60,7 +61,8 @@ const Block = (props) => {
const classProps = {
className: classnames(dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
children,
onClick
onClick,
id
};
return <div {...classProps}></div>;
};
Expand Down Expand Up @@ -116,6 +118,7 @@ Block.propTypes = {
onClick: PropTypes.func,
w: PropTypes.string,
h: PropTypes.string,
id: PropTypes.string
};

export default Block;
4 changes: 2 additions & 2 deletions components/Templates/Related.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Block {...propsContainer}>
<Block {...propsContainer} id="block-relatedNews">
<Block custom="related-news" w="100p">
{map(items, (item, key) =>
<Teaser
Expand Down

0 comments on commit 8296f29

Please sign in to comment.