@vention/machine-ui 5.15.2 → 5.16.1
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
|
@@ -12,6 +12,7 @@ export declare const getInputPaddingStyles: (size: Sizes, theme: Theme) => {
|
|
|
12
12
|
paddingLeft: string;
|
|
13
13
|
paddingRight: string;
|
|
14
14
|
};
|
|
15
|
+
export declare function getBorderRadius(): string;
|
|
15
16
|
/**
|
|
16
17
|
* Get the vertical padding style for multiline input
|
|
17
18
|
* @param size The size of the input
|
|
@@ -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,13 +24,13 @@ 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;
|
|
25
32
|
loading?: boolean;
|
|
26
33
|
}
|
|
27
34
|
export declare function getButtonStylingPropertiesGivenProps(variant: VentionButtonProps["variant"] | "simple", size: VentionButtonProps["size"], theme: Theme): StylingProperties;
|
|
28
|
-
export declare function
|
|
35
|
+
export declare function getButtonIconSize(size: VentionButtonProps["size"]): number;
|
|
29
36
|
export {};
|