Skip to content

fawadpro/css-dynamic-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

css-dynamic-class is a library for developers that enables them to create custom CSS styles using JavaScript. The createStyles hook automatically generates unique CSS class names from a styles object, making it easy to create dynamic styles that adapt to component state or specific conditions.

Installation

To install the project, follow these steps:

1- Install package: npm install css-dynamic-class --save or yarn install css-dynamic-class
2- Navigate to the project directory: cd project-name
3- Start the development server: npm start or yarn start

Getting started with css-dynamic-class

Here is an example of a basic app using css-dynamic-class Button component:

import { useStyles } from 'css-dynamic-class';

const styles = {
    myButton: {
        backgroundColor: 'blue',
        color: 'white',
        padding: '10px'
    }
}

function Button() {
    const classes = useStyles(styles);
    return <button className={classes.myButton}>Click me</button>
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published