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

@enrise/bemclassnames

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enrise/bemclassnames

A react utility function that generated prefixed classnames

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48
decreased by-34.25%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

BemClassNames

An utility function for writing simple prefixed classnames.

It is just a wrapper around classnames so you can use every feature from that library.

How to use

The following component:

import React from "react";
import bemClassNames from "bem-class-names";

const cn = bemClassNames("Main");

const Main = () => (
  <div classnames={cn()}>
    <h1 classNames={cn("title")}>The title</h1>
    <div classNames={cn("content")}>The content</div>
  </div>
);

export default Main;

Will result in:

<div class="Main">
    <h1 class="Main-title">The title</h1>
    <div class="Main-content">The content</div>
</div>

Keywords

FAQs

Package last updated on 16 Apr 2020

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