hplib-classname
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

跟 classNames 组件类似,但是会为每个 className 自动增加前缀。

主要用在开发公共组件时,需要前缀区分的时候

import React from "react";
import { getPrefixClassNames } from "./prefix-classname";

const classNames = getPrefixClassNames("abc");

const App = () => {
  return <div className={classNames("root")}>实际使用的className为:abc-root</div>;
};

Readme

Keywords

none

Package Sidebar

Install

npm i hplib-classname

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

2.54 kB

Total Files

5

Last publish

Collaborators

  • luanhaipeng