mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-12-21 22:30:08 +01:00
| .. | ||
| src | ||
| LICENSE-AGPL.txt | ||
| LICENSE-EUPL.txt | ||
| package.json | ||
| README.md | ||
| test.js | ||
@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
Componentany The component to extend with breakpoint handlingforwardRefboolean 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