@devtron-labs/devtron-fe-common-lib 0.2.24-beta-7 → 0.2.24-beta-8
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/dist/Shared/Components/Button/Button.component.d.ts +1 -1
- package/dist/Shared/Components/Button/types.d.ts +45 -10
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-BIBmbSAf.js → cssMode-CNOnBlcp.js} +1 -1
- package/dist/{freemarker2-CIIP-rNU.js → freemarker2-CSTHODLC.js} +1 -1
- package/dist/{handlebars-iPrER-LT.js → handlebars-DYWoEo9t.js} +1 -1
- package/dist/{html-1KDtGWDx.js → html-CSepiCZd.js} +1 -1
- package/dist/{htmlMode-acMWFCGr.js → htmlMode-HinwLHH0.js} +1 -1
- package/dist/{index-DjfkADnL.js → index-BrOkDNGp.js} +11859 -11838
- package/dist/index.js +488 -487
- package/dist/{javascript-DplIQc2W.js → javascript-CUHTHwOx.js} +1 -1
- package/dist/{jsonMode-Bc0MEFn6.js → jsonMode-CXf5wiqx.js} +1 -1
- package/dist/{liquid-hE9z6Dzg.js → liquid-CFddOC47.js} +1 -1
- package/dist/{mdx-DYW-46FN.js → mdx-D60hE9Wc.js} +1 -1
- package/dist/{python-D9mJvFi1.js → python-DPeEdyXo.js} +1 -1
- package/dist/{razor-CpsfL63A.js → razor-DSUNdozw.js} +1 -1
- package/dist/{tsMode-1C4PhGZh.js → tsMode-CZkX5rff.js} +1 -1
- package/dist/{typescript--iT16U3V.js → typescript-DIW6xGqn.js} +1 -1
- package/dist/{xml-DKIsXASY.js → xml-ekXswGVR.js} +1 -1
- package/dist/{yaml-BSfo2zrR.js → yaml-CarvuAFY.js} +1 -1
- package/package.json +1 -1
|
@@ -49,5 +49,5 @@ import { ButtonProps } from './types';
|
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
|
-
declare const Button: ({ variant, size, style,
|
|
52
|
+
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, ...props }: ButtonProps) => JSX.Element;
|
|
53
53
|
export default Button;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TooltipProps } from '@Common/Tooltip/types';
|
|
2
2
|
import { ComponentSizeType } from '../../constants';
|
|
3
3
|
import { ButtonHTMLAttributes, ReactElement } from 'react';
|
|
4
|
+
import { LinkProps } from 'react-router-dom';
|
|
4
5
|
export declare enum ButtonVariantType {
|
|
5
6
|
primary = "primary",
|
|
6
7
|
secondary = "secondary",
|
|
@@ -14,23 +15,48 @@ export declare enum ButtonStyleType {
|
|
|
14
15
|
warning = "warning",
|
|
15
16
|
neutral = "neutral"
|
|
16
17
|
}
|
|
17
|
-
export
|
|
18
|
+
export declare enum ButtonComponentType {
|
|
19
|
+
button = "button",
|
|
20
|
+
link = "link"
|
|
21
|
+
}
|
|
22
|
+
export type ButtonProps = ({
|
|
23
|
+
/**
|
|
24
|
+
* Component to be rendered from the available options
|
|
25
|
+
*
|
|
26
|
+
* @default ButtonComponentType.button
|
|
27
|
+
*/
|
|
28
|
+
component?: ButtonComponentType.button | never;
|
|
29
|
+
/**
|
|
30
|
+
* Props for the button component
|
|
31
|
+
*/
|
|
32
|
+
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'styles' | 'className' | 'disabled' | 'onClick'>;
|
|
33
|
+
linkProps?: never;
|
|
34
|
+
onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
|
|
35
|
+
} | {
|
|
36
|
+
component: ButtonComponentType.link;
|
|
37
|
+
/**
|
|
38
|
+
* Props for the link component
|
|
39
|
+
*/
|
|
40
|
+
linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
|
|
41
|
+
buttonProps?: never;
|
|
42
|
+
onClick?: LinkProps['onClick'];
|
|
43
|
+
}) & {
|
|
18
44
|
/**
|
|
19
45
|
* Variant of the button
|
|
20
46
|
*
|
|
21
|
-
* @default
|
|
47
|
+
* @default ButtonVariantType.primary
|
|
22
48
|
*/
|
|
23
49
|
variant?: ButtonVariantType;
|
|
24
50
|
/**
|
|
25
51
|
* Size of the button
|
|
26
52
|
*
|
|
27
|
-
* @default
|
|
53
|
+
* @default ComponentSizeType.large
|
|
28
54
|
*/
|
|
29
55
|
size?: ComponentSizeType;
|
|
30
56
|
/**
|
|
31
57
|
* Style to be applied on the button
|
|
32
58
|
*
|
|
33
|
-
* @default
|
|
59
|
+
* @default ButtonStyleType.default
|
|
34
60
|
*/
|
|
35
61
|
style?: ButtonStyleType;
|
|
36
62
|
/**
|
|
@@ -49,17 +75,26 @@ export type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'childre
|
|
|
49
75
|
* If true, the loading state is shown for the button with disabled
|
|
50
76
|
*/
|
|
51
77
|
isLoading?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Test id for the component
|
|
80
|
+
*/
|
|
52
81
|
dataTestId: string;
|
|
82
|
+
/**
|
|
83
|
+
* If true, the button is disabled
|
|
84
|
+
*
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
disabled?: boolean;
|
|
53
88
|
} & ({
|
|
54
89
|
/**
|
|
55
|
-
* If true, the
|
|
90
|
+
* If true, the tooltip is shown for the button
|
|
56
91
|
*/
|
|
57
|
-
|
|
92
|
+
showTooltip: boolean;
|
|
58
93
|
/**
|
|
59
|
-
*
|
|
94
|
+
* Props for tooltip
|
|
60
95
|
*/
|
|
61
|
-
|
|
96
|
+
tooltipProps: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate'>;
|
|
62
97
|
} | {
|
|
63
|
-
|
|
64
|
-
|
|
98
|
+
showTooltip?: never;
|
|
99
|
+
tooltipProps?: never;
|
|
65
100
|
});
|