@vention/machine-ui 5.15.2 → 5.16.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/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ButtonProps, Theme } from "@mui/material";
|
|
2
2
|
import { Sizes, StrictExtract } from "../../theme/machine-ui-theme";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
+
import { DuotoneIconType, IconType } from "../vention-icon/vention-icon";
|
|
5
|
+
/**
|
|
6
|
+
* A button icon can either be an arbitrary React node (e.g. a custom SVG component) or a
|
|
7
|
+
* `VentionIcon` type name. When a type name is provided, the button renders a `VentionIcon`
|
|
8
|
+
* sized to match the button's size.
|
|
9
|
+
*/
|
|
10
|
+
export type VentionButtonIcon = ReactNode | IconType | DuotoneIconType;
|
|
4
11
|
interface StylingProperties {
|
|
5
12
|
backgroundColor: string;
|
|
6
13
|
backgroundColorOnHover: string;
|
|
@@ -17,8 +24,8 @@ export interface VentionButtonProps extends Omit<ButtonProps, "size" | "variant"
|
|
|
17
24
|
children?: ReactNode;
|
|
18
25
|
variant?: "filled-brand" | "filled" | "outline" | "text-only" | "shaded" | "destructive";
|
|
19
26
|
disabled?: boolean;
|
|
20
|
-
iconLeft?:
|
|
21
|
-
iconRight?:
|
|
27
|
+
iconLeft?: VentionButtonIcon;
|
|
28
|
+
iconRight?: VentionButtonIcon;
|
|
22
29
|
className?: string;
|
|
23
30
|
type?: "button" | "submit";
|
|
24
31
|
fullWidth?: boolean;
|
|
@@ -26,4 +33,5 @@ export interface VentionButtonProps extends Omit<ButtonProps, "size" | "variant"
|
|
|
26
33
|
}
|
|
27
34
|
export declare function getButtonStylingPropertiesGivenProps(variant: VentionButtonProps["variant"] | "simple", size: VentionButtonProps["size"], theme: Theme): StylingProperties;
|
|
28
35
|
export declare function getButtonHeight(size: VentionButtonProps["size"], theme: Theme): string;
|
|
36
|
+
export declare function getButtonIconSize(size: VentionButtonProps["size"]): number;
|
|
29
37
|
export {};
|