reshaped 3.7.0-canary.3 → 3.7.0-canary.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +10 -10
- package/dist/cjs/themes/_generator/definitions/figma.js +3 -0
- package/dist/cjs/themes/_generator/definitions/reshaped.js +3 -0
- package/dist/cjs/themes/_generator/tokens/fontFamily/fontFamily.types.d.ts +1 -1
- package/dist/cjs/themes/figma/theme.css +1 -1
- package/dist/cjs/themes/reshaped/theme.css +1 -1
- package/dist/cjs/themes/slate/theme.css +1 -1
- package/dist/components/Tabs/tests/Tabs.stories.js +2 -2
- package/dist/components/Text/Text.js +2 -2
- package/dist/components/Text/Text.module.css +1 -1
- package/dist/components/Text/Text.types.d.ts +1 -0
- package/dist/components/Text/tests/Text.stories.d.ts +7 -0
- package/dist/components/Text/tests/Text.stories.js +41 -0
- package/dist/themes/_generator/definitions/figma.js +3 -0
- package/dist/themes/_generator/definitions/reshaped.js +3 -0
- package/dist/themes/_generator/tokens/fontFamily/fontFamily.types.d.ts +1 -1
- package/dist/themes/figma/theme.css +1 -1
- package/dist/themes/reshaped/theme.css +1 -1
- package/dist/themes/slate/theme.css +1 -1
- package/package.json +1 -1
- package/dist/components/Text/tests/Text.test.stories.d.ts +0 -21
- package/dist/components/Text/tests/Text.test.stories.js +0 -49
@@ -1,49 +0,0 @@
|
|
1
|
-
import { expect } from "storybook/test";
|
2
|
-
import Text from "../index.js";
|
3
|
-
export default {
|
4
|
-
title: "Utility components/Text/tests",
|
5
|
-
component: Text,
|
6
|
-
parameters: {
|
7
|
-
iframe: {
|
8
|
-
url: "https://reshaped.so/docs/utilities/text",
|
9
|
-
},
|
10
|
-
chromatic: { disableSnapshot: true },
|
11
|
-
},
|
12
|
-
};
|
13
|
-
export const asProp = {
|
14
|
-
name: "as",
|
15
|
-
render: () => <Text as="h1">Content</Text>,
|
16
|
-
play: async ({ canvas }) => {
|
17
|
-
const el = canvas.getByRole("heading");
|
18
|
-
expect(el).toBeInTheDocument();
|
19
|
-
},
|
20
|
-
};
|
21
|
-
export const headingAs = {
|
22
|
-
name: "heading tag resolving",
|
23
|
-
render: () => <Text variant="title-3">Content</Text>,
|
24
|
-
play: async ({ canvas }) => {
|
25
|
-
const el = canvas.getByRole("heading");
|
26
|
-
expect(el.tagName).toBe("H3");
|
27
|
-
},
|
28
|
-
};
|
29
|
-
export const headingAsResponsive = {
|
30
|
-
name: "heading tag resolving, responsive",
|
31
|
-
render: () => <Text variant={{ s: "title-3", m: "title-4" }}>Content</Text>,
|
32
|
-
play: async ({ canvas }) => {
|
33
|
-
const el = canvas.getByRole("heading");
|
34
|
-
expect(el.tagName).toBe("H4");
|
35
|
-
},
|
36
|
-
};
|
37
|
-
export const className = {
|
38
|
-
name: "className, attributes",
|
39
|
-
render: () => (<div data-testid="root">
|
40
|
-
<Text className="test-classname" attributes={{ id: "test-id" }}>
|
41
|
-
Content
|
42
|
-
</Text>
|
43
|
-
</div>),
|
44
|
-
play: async ({ canvas }) => {
|
45
|
-
const root = canvas.getByTestId("root").firstChild;
|
46
|
-
expect(root).toHaveClass("test-classname");
|
47
|
-
expect(root).toHaveAttribute("id", "test-id");
|
48
|
-
},
|
49
|
-
};
|