Skip to content

siddharthkp/use-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Silly React hook for CSS

Demo on CodeSandbox

 

install

npm install use-css

 

usage

import useCSS from 'use-css'

function Oopsy(props) {
  const className = useCSS(`
    font-size: 21px;
    font-style: italic;
    color: ${props.color};
    &:hover {
      font-weight: bold;
    }
  `)

  return <div className={className}>because why not?</div>
}

render(<Oopsy color="green" />)

 

but why?

funsies

like it?

⭐ this repo

 

license

MIT © siddharthkp

About

Silly React hook for CSS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •