0.0.21 • Published 2 years ago

@electronic-minds/adventure-js v0.0.21

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years ago

Adventure JavaScript Utilities

This package serves as the foundation for all other Adventure components but it can be the base of your project, too.

Install

npm i @electronic-minds/adventure-js

Usage

import * as adventure from '@electronic-minds/adventure-js';

Examples

this.breakpointProvider = new adventure.BreakpointProvider();

window.matchMedia(`(min-width: ${this.breakpointProvider.breakpoints.large})`).addListener(() => {
    // init logic that is needed on larger viewports
});

if (window.matchMedia(`(max-width: ${this.breakpointProvider.breakpoints.medium})`).matches) {
    // code that only needs to run on small viewports
}