@hyphen/hyphen-components 2.17.0 → 2.18.0
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/dist/components/Button/Button.d.ts +5 -1
- package/dist/components/Button/Button.stories.d.ts +1 -0
- package/dist/hyphen-components.cjs.development.js +10 -20
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +10 -20
- package/dist/hyphen-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.mdx +7 -0
- package/src/components/Button/Button.stories.tsx +19 -3
- package/src/components/Button/Button.test.tsx +241 -293
- package/src/components/Button/Button.tsx +13 -2
package/package.json
CHANGED
|
@@ -49,6 +49,13 @@ Use a combination of `tertiary-*` variant and a named icon to make an icon a but
|
|
|
49
49
|
|
|
50
50
|
<Canvas of={Stories.IconButton} />
|
|
51
51
|
|
|
52
|
+
## Shadow
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Set the `shadow` prop with a [shadow token](?path=/docs/foundation-design-tokens--docs#box-shadow) to set the outer shadow of the box.
|
|
56
|
+
|
|
57
|
+
<Canvas of={Stories.Shadow} />
|
|
58
|
+
|
|
52
59
|
## Loading
|
|
53
60
|
|
|
54
61
|
Setting the `isLoading` prop to true will replace the button text with loading indicator and disable the button to prevent unintended submissions.
|
|
@@ -110,8 +110,24 @@ export const Disabled = () => (
|
|
|
110
110
|
</Box>
|
|
111
111
|
);
|
|
112
112
|
|
|
113
|
+
export const Shadow = () => (
|
|
114
|
+
<Box direction="row" gap="sm">
|
|
115
|
+
<Button variant="secondary" shadow="xs">
|
|
116
|
+
xs shadow
|
|
117
|
+
</Button>
|
|
118
|
+
<Button variant="secondary" shadow="sm">
|
|
119
|
+
sm shadow
|
|
120
|
+
</Button>
|
|
121
|
+
<Button variant="secondary" shadow="md">
|
|
122
|
+
md shadow
|
|
123
|
+
</Button>
|
|
124
|
+
</Box>
|
|
125
|
+
);
|
|
126
|
+
|
|
113
127
|
export const Anchor = () => (
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
128
|
+
<Box direction="row" gap="sm">
|
|
129
|
+
<Button as="a" href="https://ux.hyphen.ai" target="_blank">
|
|
130
|
+
I'm an anchor tag
|
|
131
|
+
</Button>
|
|
132
|
+
</Box>
|
|
117
133
|
);
|