removing uppercasing of element, now have to make object name the name thats is to be used as component

This commit is contained in:
Alex Windett 2017-01-16 18:00:16 +00:00
parent 985a64c2a1
commit bc5d974594
1 changed files with 5 additions and 5 deletions

View File

@ -12,14 +12,14 @@ const {
// before using !important // before using !important
const elements = [ const elements = [
{ {
name: 'h1', name: 'H1',
properties: { properties: {
'line-height': '70px', 'line-height': '70px',
'font-size': '60px' 'font-size': '60px'
} }
}, },
{ {
name: 'h2', name: 'H2',
properties: { properties: {
'line-height': '60px', 'line-height': '60px',
'font-size': '40px' 'font-size': '40px'
@ -40,9 +40,9 @@ const elements = [
const BaseElements = {}; const BaseElements = {};
elements.forEach( element => { elements.forEach( element => {
const ElementNameToUpper = element.name.toUpperCase(); const ElementName = element.name;
BaseElements[ElementNameToUpper] = ({ BaseElements[ElementName] = ({
children, children,
style style
}) => { }) => {
@ -59,7 +59,7 @@ elements.forEach( element => {
}; };
// TODO: Fix proptype validation and remove eslint ignore line 1 // TODO: Fix proptype validation and remove eslint ignore line 1
BaseElements[ElementNameToUpper].propTypes = { BaseElements[ElementName].propTypes = {
children: React.PropTypes.node, children: React.PropTypes.node,
style: React.PropTypes.object, style: React.PropTypes.object,
}; };