1.0.5 • Published 3 years ago

@nmsp/ui-components v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@nmsp/ui-utilities

Overview

@nmsp/ui-utilities contains utilities for frontend design/UI.

Installation

npm install @nmsp/ui-utilities

Usage

Each utility function can be imported as a named import. For example, import { useSetScreenCSSVariables } from '@nmsp/ui-utilities'.

Available Functions

useSetScreenCSSVariables

Sets CSS variables --inner-height and --inner-width to the window innerHeight and innerWidth values as a px value. This hook can simply be included in the app and applies listeners to the window resize event and updates the CSS value accordingly.

Why?

The CSS vh unit can't be trusted

Syntax

useSetScreenCSSVariables()

Parameters

none |

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

4 years ago