-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-upload-component-with-editor
- Loading branch information
Showing
12 changed files
with
155 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
packages/react-kit/src/stories/buttons/Button2.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
import { fn } from "@storybook/test"; | ||
import { Button } from "../../components/buttons/Button"; | ||
import React from "react"; | ||
import { Meta } from "@storybook/react"; | ||
|
||
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export | ||
export default { | ||
title: "Visual Components/Buttons/Button", | ||
component: Button, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: "centered" | ||
}, | ||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs | ||
tags: ["autodocs"], | ||
args: { onClick: fn() }, | ||
argTypes: { | ||
disabled: { control: "boolean" }, | ||
size: { | ||
control: "select", | ||
options: ["small", "regular", "large"] | ||
}, | ||
children: { control: "text" }, | ||
tooltip: { control: "text" } | ||
}, | ||
decorators: [ | ||
(Story) => { | ||
return <Story />; | ||
} | ||
] | ||
} satisfies Meta<typeof Button>; | ||
|
||
const BASE_ARGS = { | ||
children: "Button Text", | ||
size: "regular", | ||
tooltip: "tooltip shown when disabled only" | ||
} as const; | ||
|
||
// More on args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const PrimaryFill = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "primaryFill" | ||
} | ||
}; | ||
|
||
export const PrimaryInverted = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "primaryInverted" | ||
} | ||
}; | ||
|
||
export const SecondaryFill = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "secondaryFill" | ||
} | ||
}; | ||
|
||
export const SecondaryInverted = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "secondaryInverted" | ||
} | ||
}; | ||
|
||
export const AccentFill = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "accentFill" | ||
} | ||
}; | ||
|
||
export const AccentInverted = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: false, | ||
variant: "accentInverted" | ||
} | ||
}; | ||
|
||
export const Disabled = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: true, | ||
loading: false, | ||
variant: "primaryFill" | ||
} | ||
}; | ||
|
||
export const Loading = { | ||
args: { | ||
...BASE_ARGS, | ||
disabled: false, | ||
loading: true, | ||
variant: "primaryFill" | ||
} | ||
}; |
Oops, something went wrong.