@varialkit/button 0.1.1 → 0.1.3
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/examples.tsx +8 -8
- package/package.json +2 -2
- package/src/Button.tsx +2 -2
- package/src/Button.types.ts +1 -1
package/examples.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import { Button } from "./src/Button";
|
|
4
4
|
import type { ButtonRadius, ButtonSize, ButtonVariant } from "./src/Button.types";
|
|
5
|
-
import type { SolaraIconName } from "@
|
|
6
|
-
import { iconNames } from "@
|
|
5
|
+
import type { SolaraIconName } from "@varialkit/icons";
|
|
6
|
+
import { iconNames } from "@varialkit/icons";
|
|
7
7
|
|
|
8
8
|
type StoryControlOption = {
|
|
9
9
|
label: string;
|
|
@@ -124,7 +124,7 @@ export const stories: Record<string, StoryDefinition> = {
|
|
|
124
124
|
<Button label="Default" variant="default" />
|
|
125
125
|
</div>
|
|
126
126
|
),
|
|
127
|
-
code: `import { Button } from "@
|
|
127
|
+
code: `import { Button } from "@varialkit/button";
|
|
128
128
|
|
|
129
129
|
export function Example() {
|
|
130
130
|
return (
|
|
@@ -147,7 +147,7 @@ export function Example() {
|
|
|
147
147
|
<Button label="Ghost" variant="ghost" />
|
|
148
148
|
</div>
|
|
149
149
|
),
|
|
150
|
-
code: `import { Button } from "@
|
|
150
|
+
code: `import { Button } from "@varialkit/button";
|
|
151
151
|
|
|
152
152
|
export function Example() {
|
|
153
153
|
return (
|
|
@@ -171,7 +171,7 @@ export function Example() {
|
|
|
171
171
|
<Button label="Swap" iconLeft="arrow_swap_16" iconRight="arrow_swap_16" variant="tertiary" />
|
|
172
172
|
</div>
|
|
173
173
|
),
|
|
174
|
-
code: `import { Button } from "@
|
|
174
|
+
code: `import { Button } from "@varialkit/button";
|
|
175
175
|
|
|
176
176
|
export function Example() {
|
|
177
177
|
return (
|
|
@@ -194,7 +194,7 @@ export function Example() {
|
|
|
194
194
|
<Button iconOnly="arrow_line_rotate_right_16" aria-label="Refresh" variant="ghost" />
|
|
195
195
|
</div>
|
|
196
196
|
),
|
|
197
|
-
code: `import { Button } from "@
|
|
197
|
+
code: `import { Button } from "@varialkit/button";
|
|
198
198
|
|
|
199
199
|
export function Example() {
|
|
200
200
|
return (
|
|
@@ -222,7 +222,7 @@ export function Example() {
|
|
|
222
222
|
</div>
|
|
223
223
|
</div>
|
|
224
224
|
),
|
|
225
|
-
code: `import { Button } from "@
|
|
225
|
+
code: `import { Button } from "@varialkit/button";
|
|
226
226
|
|
|
227
227
|
export function Example() {
|
|
228
228
|
return (
|
|
@@ -249,7 +249,7 @@ export function Example() {
|
|
|
249
249
|
<Button label="Disabled" variant="primary" disabled />
|
|
250
250
|
</div>
|
|
251
251
|
),
|
|
252
|
-
code: `import { Button } from "@
|
|
252
|
+
code: `import { Button } from "@varialkit/button";
|
|
253
253
|
|
|
254
254
|
export function Example() {
|
|
255
255
|
return (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varialkit/button",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"./examples": "./examples/index.tsx"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@varialkit/icons": "0.1.
|
|
12
|
+
"@varialkit/icons": "0.1.3"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"src",
|
package/src/Button.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Button.scss";
|
|
2
|
-
import { Icon } from "@
|
|
3
|
-
import type { IconProps } from "@
|
|
2
|
+
import { Icon } from "@varialkit/icons";
|
|
3
|
+
import type { IconProps } from "@varialkit/icons";
|
|
4
4
|
import type { ButtonIcon, ButtonProps } from "./Button.types";
|
|
5
5
|
|
|
6
6
|
const normalizeIconProps = (icon: ButtonIcon): IconProps =>
|
package/src/Button.types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
-
import type { IconProps } from "@
|
|
2
|
+
import type { IconProps } from "@varialkit/icons";
|
|
3
3
|
|
|
4
4
|
export type ButtonVariant = "primary" | "default" | "tertiary" | "ghost" | "accent";
|
|
5
5
|
export type ButtonSize = "small" | "medium" | "large";
|