Skip to content

styles 1.0.0

Install from the command line:
Learn more about npm packages
$ npm install @enzsft/styles@1.0.0
Install via package.json:
"@enzsft/styles": "1.0.0"

About this version

Styles

Utilities to work with styles.

Installation

npm install @enzsft/styles

Usage

Concatenate styles and optimise whitespace and conditionally apply styles.

import { clsx } from "@enzsft/styles";

clsx("one", "two", "three");
// one two three

clsx("one", false && "two", "three");
// one three

Apply the first truthy style.

import { fclsx } from "@enzsft/styles";

fclsx("one", "two", "three");
// one

fclsx(false && "one", false && "two", "three");
// three

Build styles from an object.

import { oclsx } from "@enzsft/styles";

const styles = oclsx({
  one: "one",
  two: "two",
  three: "three",
});

oclsx({
  one: true,
  two: false,
  three: true,
});
// one three

oclsx({
  three: true,
});
// three

Details


Assets

  • styles-1.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all