@ustack/uskin
Version:
A graceful framework which provides developers another chance to build an amazing site.
36 lines (28 loc) • 648 B
JSX
import PropTypes from 'prop-types';
import React from 'react';
import styles from '../../mixins/styles';
class Panel extends React.PureComponent {
constructor(props) {
super(props);
}
render() {
const props = this.props;
let style = styles.getWidth(props.width);
return (
<div className="panel" style={style}>
<div className="panel-hd">
{props.title}
</div>
<div className="panel-bd">
{props.content}
</div>
</div>
);
}
}
Panel.propTypes = {
title: PropTypes.string,
content: PropTypes.string,
width: PropTypes.number
};
export default Panel;