From bc5d974594582c8fe666ff40b48a03022fa3fd3c Mon Sep 17 00:00:00 2001 From: Alex Windett Date: Mon, 16 Jan 2017 18:00:16 +0000 Subject: [PATCH] removing uppercasing of element, now have to make object name the name thats is to be used as component --- ui/src/components/base-elements/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/components/base-elements/index.js b/ui/src/components/base-elements/index.js index cf65f744..8c7cf170 100644 --- a/ui/src/components/base-elements/index.js +++ b/ui/src/components/base-elements/index.js @@ -12,14 +12,14 @@ const { // before using !important const elements = [ { - name: 'h1', + name: 'H1', properties: { 'line-height': '70px', 'font-size': '60px' } }, { - name: 'h2', + name: 'H2', properties: { 'line-height': '60px', 'font-size': '40px' @@ -40,9 +40,9 @@ const elements = [ const BaseElements = {}; elements.forEach( element => { - const ElementNameToUpper = element.name.toUpperCase(); + const ElementName = element.name; - BaseElements[ElementNameToUpper] = ({ + BaseElements[ElementName] = ({ children, style }) => { @@ -59,7 +59,7 @@ elements.forEach( element => { }; // TODO: Fix proptype validation and remove eslint ignore line 1 - BaseElements[ElementNameToUpper].propTypes = { + BaseElements[ElementName].propTypes = { children: React.PropTypes.node, style: React.PropTypes.object, };