·
14 commits
to refs/heads/master
since this release
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",
})
})Full Changelog: v3.2.1...v3.2.2