Skip to content

Commit 148b717

Browse files
committed
fix: fix leaf object key is not converted to kebab-case
Fix #66
1 parent 77023a2 commit 148b717

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ const toCSSVariables = (object: CSSObject, options?: Options) => {
3737
addCSSVariable(value, [...parentKeys, paramCase(key)])
3838
} else {
3939
cssVariables.push({
40-
key: `--${(options && options.prefix && `${options.prefix}-`) || ''}${[...parentKeys, key].join('-')}`,
40+
key: `--${(options && options.prefix && `${options.prefix}-`) || ''}${[...parentKeys, paramCase(key)].join(
41+
'-'
42+
)}`,
4143
value,
4244
})
4345
}

0 commit comments

Comments
 (0)