Skip to content

Commit

Permalink
chore(utils): added status classNames (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
N1MBER committed Oct 10, 2023
1 parent 145a57e commit a249087
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/utils/bem.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import { withNaming } from '@bem-react/classname';

export const cn = withNaming({ n: 'cw--', e: '-', m: '_' });
const reactBemNaming = { n: 'cw--', e: '-', m: '_', v: '_' };

export const cn = withNaming(reactBemNaming);

export const withPrefix = (prefix: string) =>
withNaming({ ...reactBemNaming, n: prefix + reactBemNaming.n });

export const cnCanary = withPrefix('canary');

export const cnDeprecated = withPrefix('deprecated');

0 comments on commit a249087

Please sign in to comment.