fix: do not filter style properties in style object with value 0
This commit is contained in:
parent
17eddcf157
commit
caf1460139
|
@ -7,7 +7,7 @@ export function c(input: Array<string | boolean> | object): string {
|
||||||
|
|
||||||
export function s(styles: object): string {
|
export function s(styles: object): string {
|
||||||
return Object.keys(styles)
|
return Object.keys(styles)
|
||||||
.filter((key: keyof object) => !!styles[key])
|
.filter((key: keyof object) => styles[key] === 0 || !!styles[key])
|
||||||
.map((key: keyof object) => `${key}:${styles[key]}`)
|
.map((key: keyof object) => `${key}:${styles[key]}`)
|
||||||
.join(';');
|
.join(';');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue