@digitransit-component/digitransit-component-with-breakpoint
v0.0.5
Published
digitransit-component with-breakpoint module
Downloads
13
Maintainers
Readme
@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 handlingforwardRef
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