@bolttech/ob-atoms-button 1.0.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/README.md +31 -0
- package/index.cjs.css +211 -0
- package/index.cjs.js +1143 -0
- package/index.d.ts +1 -0
- package/package.json +10 -0
- package/src/index.d.ts +2 -0
- package/src/lib/button.d.ts +4 -0
- package/src/lib/button.interface.d.ts +27 -0
- package/src/lib/button.stories.d.ts +12 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
package/package.json
ADDED
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultProps } from '@bolttech/ui-utils';
|
|
2
|
+
export type ButtonVariants = 'transaction' | 'brand' | 'alternative' | 'outline' | 'ghost';
|
|
3
|
+
export type ButtonSizes = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type ButtonTypes = 'button' | 'submit';
|
|
5
|
+
export interface IButtonProps extends DefaultProps {
|
|
6
|
+
dataTestId?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
variant: ButtonVariants;
|
|
10
|
+
size: ButtonSizes;
|
|
11
|
+
/**
|
|
12
|
+
* The HTML `id` attribute for the button.
|
|
13
|
+
*
|
|
14
|
+
* Must be unique within the document and conform to
|
|
15
|
+
* HTML `id` naming rules (no spaces, not starting with a digit, etc.).
|
|
16
|
+
* Useful for targeting the button in scripts, automated tests,
|
|
17
|
+
* or associating it with a `<label>` for accessibility.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue - no `id` attribute is rendered
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
iconRight?: string;
|
|
23
|
+
iconLeft?: string;
|
|
24
|
+
type?: ButtonTypes;
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<import("./button.interface").IButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
export default meta;
|
|
7
|
+
type Story = StoryObj<typeof meta>;
|
|
8
|
+
export declare const Alternative: Story;
|
|
9
|
+
export declare const Brand: Story;
|
|
10
|
+
export declare const Ghost: Story;
|
|
11
|
+
export declare const Outline: Story;
|
|
12
|
+
export declare const Transaction: Story;
|