Skip to content

Commit

Permalink
Fix: Transform obect - Work with array
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Jan 14, 2024
1 parent 6eaa386 commit 90de3b0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/transform-to-vanilla/src/transform-object/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function transformStyle(style: CSSRule) {
][]) {
const transformedValue =
typeof value === "object"
? transformStyle(value as CSSRule) // TODO: Array
? Array.isArray(value)
? value
: transformStyle(value as CSSRule) // TODO: Array
: typeof value === "string"
? simplyImportant(value)
: value;
Expand All @@ -39,6 +41,16 @@ if (import.meta.vitest) {
const { describe, it, expect } = import.meta.vitest;

describe.concurrent("transform", () => {
it("Fallback style", () => {
expect(
transformStyle({
overflow: ["auto", "overlay"]
})
).toStrictEqual({
overflow: ["auto", "overlay"]
});
});

it("Simply Important", () => {
expect(
transformStyle({
Expand Down

0 comments on commit 90de3b0

Please sign in to comment.