New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

enhanced-css-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enhanced-css-loader

Allows alternate syntax for combining multiple styles without the use of `compose`

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

Style transformer.

Allows alternate syntax for combining multiple styles without the use of compose.

Usage:

className={styles.someclass}
  -> className='someclass'

className={styles.someclass({ otherclass: true })}
  -> className='someclass otherclass'

Useful with props:

className={styles.someclass({ otherclass: this.props.booleanValue })}

Full example:

SASS:

.header
    font-size: 2em
    font-weight: bold

    &.small
        font-size: 1.5em

.logo
    // Regular styles can be used as usual

React Component:

// ...
import styles from '.../stylesheet.css'

// ...
  render () {
    return (
      <div className={styles.header({ small: this.props.small })}>
        <div className={styles.logo}></div>
        Example Text
      </div>
    )

  }
// ...

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts