@digitransit-component/digitransit-component-with-breakpoint

0.0.5 • Public • Published

@digitransit-component/digitransit-component-with-breakpoint

BreakpointConsumer

Extracts breakpoint information (can be one of: large, medium and small) from the context.

withBreakpoint

Extends the given Component with breakpoint handling. The breakpoint is extracted from context and given to the extended component as a property.

Parameters

  • Component any The component to extend with breakpoint handling
  • forwardRef boolean Whether any ref given to the HOC should be forwarded to the extended Component. (optional, default {forwardRef:false})
    • forwardRef.forwardRef

This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.

Installation

Install this module individually:

$ npm install @digitransit-component/digitransit-component-with-breakpoint

Or install the digitransit-component module that includes it as a class:

$ npm install @digitransit-component/digitransit-component

Package Sidebar

Install

npm i @digitransit-component/digitransit-component-with-breakpoint

Weekly Downloads

6

Version

0.0.5

License

(AGPL-3.0 OR EUPL-1.2)

Unpacked Size

36.6 kB

Total Files

3

Last publish

Collaborators

  • digitransit