Make second parameter to className optional

This commit is contained in:
Adam Wathan 2019-04-25 07:59:47 -04:00
parent c6ae957aff
commit 8fb2351463
2 changed files with 25 additions and 1 deletions

View file

@ -1,7 +1,7 @@
import _ from 'lodash'
import escapeClassName from './escapeClassName'
export default function className(base, modifier) {
export default function className(base, modifier = 'default') {
const name = (() => {
if (modifier === 'default') {
return base