Cloudflare Responsive Design Utils
Installation with yarn is recommended
$ yarn add @cloudflare/util-responsive
import React from 'react';
import PropTypes from 'prop-types';
import { withAutoWidth } from '../../src';
const FullWidthComp = ({ width }) => (
<svg width={width} height={100}>
<rect width={width} height={100} fill="blue" />
</svg>
);
FullWidthComp.propTypes = {
width: PropTypes.number.isRequired
};
export default withAutoWidth(FullWidthComp);