@abhijithvijayan/styler
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@abhijithvijayan/styler

CSS Modules Style Helper

🙋‍♂️ Made by @abhijithvijayan

Donate: PayPal, Patreon

Buy Me a Coffee


❤️ it? ⭐️ it on GitHub or Tweet about it.

Table of Contents

Installation

Ensure you have Node.js 18 or later installed. Then run the following:

# via npm
npm install @abhijithvijayan/styler

# or yarn
yarn add @abhijithvijayan/styler

Usage

import Styler from '@abhijithvijayan/styler';
import * as React from 'react';

import styles from './styles.scss';


function App({theme = {}, show = false}) {
	const styler = new Styler(styles, theme);

	return (
		<div className={styler.get("wrapper")}>
			<p className={styler.get(["heading", show && "show"])}>hello world</p>
			<p className={styler.get(["message"], ["static-class-name"])}>new message</p>
		</div>
	);
}

API

Issues

Looking to contribute? Look for the Good First Issue label.

🐛 Bugs

Please file an issue here for bugs, missing documentation, or unexpected behavior.

See Bugs

Linting & TypeScript Config

License

MIT © Abhijith Vijayan

Readme

Keywords

Package Sidebar

Install

npm i @abhijithvijayan/styler

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

9.46 kB

Total Files

7

Last publish

Collaborators

  • abhijithvijayan