From d75b5ae200564860f78fefbe8a7eaa24c7fed6d9 Mon Sep 17 00:00:00 2001 From: Wagner Moschini Date: Mon, 30 Jan 2017 23:57:34 -0200 Subject: [PATCH 1/3] add row and col components --- .gitignore | 3 ++- src/components/Col.js | 35 +++++++++++++++++++++++++++++++++++ src/components/Row.js | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 src/components/Col.js create mode 100644 src/components/Row.js diff --git a/.gitignore b/.gitignore index 9b26ed0..8c71477 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -lib \ No newline at end of file +lib +.idea \ No newline at end of file diff --git a/src/components/Col.js b/src/components/Col.js new file mode 100644 index 0000000..a77315f --- /dev/null +++ b/src/components/Col.js @@ -0,0 +1,35 @@ +import React, { PropTypes } from 'react' +import EmailPropTypes from '../PropTypes' +import includeDataProps from '../includeDataProps' + +export default function Col(props) { + return ( + + {props.children} + + ) +} + +Col.propTypes = { + className: PropTypes.string, + bgcolor: PropTypes.string, + colSpan: PropTypes.number, + align: PropTypes.oneOf(['left', 'center', 'right']), + valign: PropTypes.oneOf(['top', 'middle', 'bottom']), + style: EmailPropTypes.style, + children: PropTypes.node +}; + +Col.defaultProps = { + className: null, + bgcolor: null, + align: 'center', + valign: 'top', + style: null +}; \ No newline at end of file diff --git a/src/components/Row.js b/src/components/Row.js new file mode 100644 index 0000000..b3031db --- /dev/null +++ b/src/components/Row.js @@ -0,0 +1,33 @@ +import React, { PropTypes } from 'react' +import EmailPropTypes from '../PropTypes' +import includeDataProps from '../includeDataProps' + +export default function Row(props) { + return ( + + {props.children} + + ) +} + +Row.propTypes = { + className: PropTypes.string, + bgcolor: PropTypes.string, + align: PropTypes.oneOf(['left', 'center', 'right']), + valign: PropTypes.oneOf(['top', 'middle', 'bottom']), + style: EmailPropTypes.style, + children: PropTypes.node, +} + +Row.defaultProps = { + className: null, + bgcolor: null, + align: 'center', + valign: 'top', + style: null +}; \ No newline at end of file From aa6c9c693dea51d9b591433cb7751f2b122a18c0 Mon Sep 17 00:00:00 2001 From: Wagner Moschini Date: Tue, 31 Jan 2017 00:05:18 -0200 Subject: [PATCH 2/3] fix lint --- src/components/Col.js | 50 +++++++++++++++++++++---------------------- src/components/Row.js | 44 ++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/components/Col.js b/src/components/Col.js index a77315f..804f1bc 100644 --- a/src/components/Col.js +++ b/src/components/Col.js @@ -3,33 +3,33 @@ import EmailPropTypes from '../PropTypes' import includeDataProps from '../includeDataProps' export default function Col(props) { - return ( - - {props.children} - - ) + return ( + + {props.children} + + ) } Col.propTypes = { - className: PropTypes.string, - bgcolor: PropTypes.string, - colSpan: PropTypes.number, - align: PropTypes.oneOf(['left', 'center', 'right']), - valign: PropTypes.oneOf(['top', 'middle', 'bottom']), - style: EmailPropTypes.style, - children: PropTypes.node -}; + className: PropTypes.string, + bgcolor: PropTypes.string, + colSpan: PropTypes.number, + align: PropTypes.oneOf(['left', 'center', 'right']), + valign: PropTypes.oneOf(['top', 'middle', 'bottom']), + style: EmailPropTypes.style, + children: PropTypes.node, +} Col.defaultProps = { - className: null, - bgcolor: null, - align: 'center', - valign: 'top', - style: null -}; \ No newline at end of file + className: null, + bgcolor: null, + align: 'center', + valign: 'top', + style: null, +} diff --git a/src/components/Row.js b/src/components/Row.js index b3031db..379c034 100644 --- a/src/components/Row.js +++ b/src/components/Row.js @@ -3,31 +3,31 @@ import EmailPropTypes from '../PropTypes' import includeDataProps from '../includeDataProps' export default function Row(props) { - return ( - - {props.children} - - ) + return ( + + {props.children} + + ) } Row.propTypes = { - className: PropTypes.string, - bgcolor: PropTypes.string, - align: PropTypes.oneOf(['left', 'center', 'right']), - valign: PropTypes.oneOf(['top', 'middle', 'bottom']), - style: EmailPropTypes.style, - children: PropTypes.node, + className: PropTypes.string, + bgcolor: PropTypes.string, + align: PropTypes.oneOf(['left', 'center', 'right']), + valign: PropTypes.oneOf(['top', 'middle', 'bottom']), + style: EmailPropTypes.style, + children: PropTypes.node, } Row.defaultProps = { - className: null, - bgcolor: null, - align: 'center', - valign: 'top', - style: null -}; \ No newline at end of file + className: null, + bgcolor: null, + align: 'center', + valign: 'top', + style: null, +} From 2cc06db4af63882cc58d25b0907a9c781b996067 Mon Sep 17 00:00:00 2001 From: Wagner Moschini Date: Tue, 31 Jan 2017 00:47:46 -0200 Subject: [PATCH 3/3] add row and col imports --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index df7e766..148683a 100644 --- a/src/index.js +++ b/src/index.js @@ -3,6 +3,8 @@ import Box from './components/Box' import Email from './components/Email' import Image from './components/Image' import Item from './components/Item' +import Row from './components/Row' +import Col from './components/Col' import Span from './components/Span' import A from './components/A' import injectReactEmailAttributes from './injectReactEmailAttributes' @@ -20,6 +22,8 @@ export { Email, Image, Item, + Row, + Col, Span, A, injectReactEmailAttributes,