1.3.0 • Published 3 years ago

@riot-material/app-bar-utils v1.3.0

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

app-bar utilities based on Material Design for riot-material

Installation

You can install it via nodejs

npm install @riot-material/app-bar-utils

or download one of the bundled file

/* `dist/index.amd.js` or `dist/index.umd.js` */
requirejs.config({
  paths: {
    "@riot-material/app-bar-utils": "path/to/@riot-material/app-bar-utils",
  },
});

require(['@riot-material/app-bar-utils'], function (appBarUtils) {
    // ...
});

/* `dist/index.js` */
import * as appBarUtils from "@riot-material/app-bar-utils";

// or

import { ... } from "@riot-material/app-bar-utils";

otherwise you can include the script in your project html

<script src="@riot-material/app-bar-utils/index.umd.js" />

and access it via

window.riotMaterial.appBarUtils;

Documentation

getHeight(): number

returns number: the height of the app-bar

Note: it internally calls setup

offChange(listener: (this: T) => void, thisArg?: T): void

removes the listener

listener: (this: T) => void the listener to call when change in height happens
thisArg: T the this argument to pass to the listener when called

onceChange(listener: (this: T) => void, thisArg?: T): void

adds a listener that will be called once when the height of the app bar changes

listener: (this: T) => void the listener to call when change in height happens
thisArg: T the this argument to pass to the listener when called

onChange(listener: (this: T) => void, thisArg?: T): void

adds a listener that will be called when the height of the app bar changes

listener: (this: T) => void the listener to call when change in height happens
thisArg: T the this argument to pass to the listener when called

setup()

Note: internally called by getHeight