Skip to content

Commit

Permalink
add cssUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyaseki committed Oct 15, 2021
1 parent 780440e commit eab8323
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/cssUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { kebabize } from './stringUtils'

export function buildClassName(className: string, textIndex?: number): string {
const index = textIndex ? textIndex?.toString() : ''
return kebabize(className.replace(/\s/g, '')) + index
}

0 comments on commit eab8323

Please sign in to comment.