react-heatmap-grid
Version:
React component for heatmap on grid layout
18 lines (13 loc) • 403 B
JSX
import React from "react";
import PropTypes from "prop-types";
const FixedBox = ({ children, width }) => {
return <div id='y-label' style={{ flex: `0 0 ${width}px` }}> {children} </div>;
};
FixedBox.defaultProps = {
children: " ",
};
FixedBox.propTypes = {
children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
width: PropTypes.number.isRequired,
};
export default FixedBox;