Switch camel-to-kebab case convertion in v helper
Calling as a function will no longer do the transformation, but instead indexing the proxy will do this now.
This commit is contained in:
parent
b5ab9fafdb
commit
f5f3794006
1 changed files with 5 additions and 3 deletions
8
css.js
8
css.js
|
@ -38,7 +38,9 @@ const mkVar = name => {
|
|||
return v
|
||||
}
|
||||
|
||||
export const v = new Proxy(Window, {
|
||||
get: (target, name, receiver) => mkVar(name),
|
||||
apply: (target, object, [name]) => `var(--${keyToPropName(name)})`,
|
||||
export const variable = new Proxy(Window, {
|
||||
get: (target, name, receiver) => mkVar(keyToPropName(name)),
|
||||
apply: (target, object, [name, value]) => value
|
||||
? `var(--${name})`
|
||||
: `var(--${name}, value)`
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue