Skip to content

v3.2.2

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jul 07:31
· 14 commits to refs/heads/master since this release
919d547

Bug Fixes 🐛

tools.rotary's compose method does not correctly handle merging behavior. It disappears original T/F property when return new instance using compose.

Now these compose tests are passed correctly.

it("should handle multiple compositions on ToggleStyler", () => {
    const toggle = tw.toggle({
        base: { color: "gray" },
        truthy: { color: "green" },
        falsy: { color: "red" },
    })

    const composed1 = toggle.compose({ backgroundColor: "white" })
    const composed2 = composed1.compose({ padding: "10px" })
    const composed3 = composed2.compose({
        color: "black",
    })

    expect(composed1.style(true)).toEqual({
        color: "green",
        backgroundColor: "white",
    })
    expect(composed2.style(false)).toEqual({
        color: "red",
        backgroundColor: "white",
        padding: "10px",
    })
    expect(composed3.style(true)).toEqual({
        color: "green",
        backgroundColor: "white",
        padding: "10px",
    })
})
  • 164 bug toggle styler compose method preserve issue @danpacho (#165)

Full Changelog: v3.2.1...v3.2.2