src/elements/thead.js
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from '../../build/styles';
import { getCallbacks } from '../helper/helper';
export default class Thead extends Component {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
style: PropTypes.object,
};
static defaultProps = {
className: '',
style: {},
};
createClassName() {
return [
styles.tr,
this.props.className,
].join(' ').trim();
}
render() {
return (
<thead
{...getCallbacks(this.props)}
className={this.createClassName()}
style={this.props.style}
>
{this.props.children}
</thead>
);
}
}