-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathCol.jsx
40 lines (37 loc) · 891 Bytes
/
Col.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react'
import PropTypes from 'prop-types'
import EmailPropTypes from '../PropTypes'
import includeDataProps from '../includeDataProps'
export default function Col(props) {
return (
<td
{...includeDataProps(props)}
className={props.className}
align={props.align}
valign={props.valign}
bgcolor={props.bgcolor}
colSpan={props.colSpan}
style={props.style}
>
{props.children}
</td>
)
}
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 = {
colSpan: null,
children: null,
className: null,
bgcolor: null,
align: 'center',
valign: 'top',
style: null,
}