Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aesthetic-adapter-css-modules

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aesthetic-adapter-css-modules

CSS modules support for Aesthetic.

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Aesthetic with CSS Modules

Provides CSS Modules support for Aesthetic, a React styling library.

This library does not enable CSS modules, it simply applies the class names to the React component. Supporting CSS modules will need to be enabled with Webpack or Babel.

Requirements

  • React 15+
  • Aesthetic
  • CSS Modules

Installation

npm install aesthetic aesthetic-adapter-css-modules --save
// Or
yarn add aesthetic aesthetic-adapter-css-modules

Usage

More information on how to get started can be found in the official documentation.

import Aesthetic from 'aesthetic';
import CSSModulesAdapter from 'aesthetic-adapter-css-modules';

const aesthetic = new Aesthetic(new CSSModulesAdapter());

Unified Syntax

CSS modules do not support Aesthetic's unified syntax.

Usage

When defining styles for a React component, simply pass the CSS modules object to the styler function, instead of setting the element className props directly.

import React from 'react';
import style from '../path/to/styler';
import styles from './styles.css';

function Component() {
  // ...
}

export default style(styles)(Component);

Keywords

FAQs

Package last updated on 14 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc