feat(motion): add interactive micro-feedback
This commit is contained in:
@@ -13,23 +13,23 @@ describe("motion contract", () => {
|
||||
expect(motionModeDetails[defaultMotionMode].label).toBeTruthy();
|
||||
});
|
||||
|
||||
it("sets default motion mode on the document root", () => {
|
||||
setMotionMode("default");
|
||||
it("sets interactive motion mode on the document root", () => {
|
||||
setMotionMode("interactive");
|
||||
|
||||
expect(document.documentElement.dataset.motion).toBe("default");
|
||||
expect(document.documentElement.dataset.motion).toBe("interactive");
|
||||
});
|
||||
|
||||
it("sets reduced motion mode on the document root", () => {
|
||||
setMotionMode("reduced");
|
||||
it("sets static motion mode on the document root", () => {
|
||||
setMotionMode("static");
|
||||
|
||||
expect(document.documentElement.dataset.motion).toBe("reduced");
|
||||
expect(document.documentElement.dataset.motion).toBe("static");
|
||||
});
|
||||
|
||||
it("supports explicit reduced mode on custom roots", () => {
|
||||
it("supports explicit static mode on custom roots", () => {
|
||||
const target = document.createElement("div");
|
||||
|
||||
setMotionMode("reduced", target);
|
||||
setMotionMode("static", target);
|
||||
|
||||
expect(target.dataset.motion).toBe("reduced");
|
||||
expect(target.dataset.motion).toBe("static");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user