@cloudflare/util-responsive

3.0.1 • Public • Published

@cloudflare/util-responsive

Cloudflare Responsive Design Utils

Installation

Installation with yarn is recommended

$ yarn add @cloudflare/util-responsive

Usage

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);

Readme

Keywords

none

Package Sidebar

Install

npm i @cloudflare/util-responsive

Weekly Downloads

1,163

Version

3.0.1

License

BSD-3-Clause

Unpacked Size

145 kB

Total Files

11

Last publish

Collaborators

  • lerwincf
  • lbarthonet
  • cf-media-manager
  • jacobbednarz
  • celso
  • cf-radar
  • dash_service_account
  • g4brym
  • snigdha34
  • wrangler-publisher
  • marksteyn
  • chiminator
  • sgoodhew_cf
  • terinjokes
  • third774
  • jsteinberger
  • jasnell
  • asapzacy
  • pcostanzo
  • gregbrimble
  • geelen
  • rexscaria
  • dcruz_cf
  • xuranwang
  • jculvey
  • sejoker
  • vasturiano
  • cf-ci-write
  • segments-write
  • thibmeu
  • xortive
  • gurjinder
  • cf-ci2
  • lvalenta
  • worenga