Skip to content

Commit

Permalink
add class name to content table
Browse files Browse the repository at this point in the history
  • Loading branch information
saldoukhov committed Sep 29, 2020
1 parent e86a10f commit 4b6557e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-html-email",
"description": "Create elegant HTML email templates using React.",
"version": "3.0.1",
"version": "3.0.2",
"keywords": [
"react",
"html",
Expand Down
4 changes: 3 additions & 1 deletion src/components/Box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import EmailPropTypes from '../PropTypes'

export default function Box({ children, ...props }) {
return (
<table {...props}>
<table {...props} className={props.className}>
<tbody>
{children}
</tbody>
Expand All @@ -13,6 +13,7 @@ export default function Box({ children, ...props }) {
}

Box.propTypes = {
className: PropTypes.string,
cellPadding: PropTypes.number,
cellSpacing: PropTypes.number,
border: PropTypes.string,
Expand All @@ -26,6 +27,7 @@ Box.propTypes = {
}

Box.defaultProps = {
className: undefined,
cellPadding: 0,
cellSpacing: 0,
border: '0',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Email.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Email(props) {
>
<Box width="100%" height="100%" bgcolor={props.bgcolor}>
<Item align={props.align} valign={props.valign}>
<Box width={props.width} align="center" cellPadding={props.cellPadding} cellSpacing={props.cellSpacing} style={props.style}>
<Box className="content" width={props.width} align="center" cellPadding={props.cellPadding} cellSpacing={props.cellSpacing} style={props.style}>
{props.children}
</Box>
</Item>
Expand Down

0 comments on commit 4b6557e

Please sign in to comment.