Skip to content

Commit

Permalink
feat: the parameter of prefixClaName supports Symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
wewoor committed Oct 19, 2020
1 parent 8001437 commit 8b258de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/className.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { APP_PREFIX } from '@/common/const';
import { APP_PREFIX } from 'mo/common/const';

/**
* This function help you prefix a css class name, default is molecule.
Expand All @@ -7,6 +7,6 @@ import { APP_PREFIX } from '@/common/const';
* @param name Default class name
* @param prefix The prefix of class name you want to append
*/
export function prefixClaName(name: string, prefix: string = APP_PREFIX) {
export function prefixClaName(name: string | Symbol, prefix: string | Symbol = APP_PREFIX ) {
return name ? `${prefix}-${name}` : '';
}

0 comments on commit 8b258de

Please sign in to comment.