Skip to content

Commit 0adde0b

Browse files
committed
Merge pull request #74 from christopher-ramirez/master
Add support for text-align attribute in Section component.
2 parents c23b151 + 337cfaf commit 0adde0b

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/components/Section.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Section extends Component {
4747
return _.merge({}, this.constructor.baseStyles, {
4848
td: {
4949
fontSize: 0,
50+
textAlign: mjAttribute('text-align'),
5051
verticalAlign: mjAttribute('vertical-align'),
5152
padding: mjAttribute('padding'),
5253
paddingTop: mjAttribute('padding-top'),
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<body>
2+
<div class="mj-body">
3+
<!--[if mso]>
4+
<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;">
5+
<tr>
6+
<td>
7+
<![endif]-->
8+
<div style="margin:0 auto;max-width:600px;">
9+
<table class="" cellpadding="0" cellspacing="0" style="width:100%;font-size:0px;" align="center">
10+
<tbody>
11+
<tr>
12+
<td style="text-align:left;vertical-align:top;font-size:0;padding:20px 0;"></td>
13+
</tr>
14+
</tbody>
15+
</table>
16+
</div>
17+
<!--[if mso]>
18+
</td>
19+
</tr>
20+
</table>
21+
<![endif]-->
22+
</div>
23+
</body>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<mj-body>
2+
<mj-section text-align="left">
3+
</mj-section>
4+
</mj-body>

0 commit comments

Comments
 (0)