@devtron-labs/devtron-fe-common-lib 0.0.71-beta-5 → 0.0.71-beta-6
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.
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
import ClipboardProps from './types';
|
|
3
3
|
/**
|
|
4
4
|
* @param content - Content to be copied
|
|
5
|
-
* @param copiedTippyText - Text to be shown in the tippy when the content is copied
|
|
6
|
-
* @param duration - Duration for which the tippy should be shown
|
|
7
|
-
* @param trigger - To trigger the copy action
|
|
8
|
-
* @param setTrigger - Callback function to set the trigger
|
|
9
|
-
* @param rootClassName - additional classes to add to button
|
|
10
|
-
* @param iconSize - size of svg icon to be shown, default 16 (icon-dim-16)
|
|
5
|
+
* @param copiedTippyText - Text to be shown in the tippy when the content is copied
|
|
6
|
+
* @param duration - Duration for which the tippy should be shown
|
|
7
|
+
* @param trigger - To trigger the copy action, if set to true the content will be copied, use case being triggering the copy action from outside the component
|
|
8
|
+
* @param setTrigger - Callback function to set the trigger
|
|
11
9
|
*/
|
|
12
|
-
export default function ClipboardButton({ content, copiedTippyText, duration, trigger, setTrigger
|
|
10
|
+
export default function ClipboardButton({ content, copiedTippyText, duration, trigger, setTrigger }: ClipboardProps): JSX.Element;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export default interface ClipboardProps {
|
|
3
3
|
content: string;
|
|
4
|
-
copiedTippyText
|
|
5
|
-
duration
|
|
6
|
-
trigger
|
|
7
|
-
setTrigger
|
|
8
|
-
rootClassName?: string;
|
|
9
|
-
iconSize?: number;
|
|
4
|
+
copiedTippyText: string;
|
|
5
|
+
duration: number;
|
|
6
|
+
trigger: boolean;
|
|
7
|
+
setTrigger: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
8
|
}
|
|
@@ -2,6 +2,16 @@ export interface ValidationResponseType {
|
|
|
2
2
|
isValid: boolean;
|
|
3
3
|
message?: string;
|
|
4
4
|
}
|
|
5
|
+
export declare const MESSAGES: {
|
|
6
|
+
PROVIDE_A_NUMBER: string;
|
|
7
|
+
LOWERCASE_ALPHANUMERIC: string;
|
|
8
|
+
CAN_NOT_START_END_WITH_SEPARATORS: string;
|
|
9
|
+
getMinMaxCharMessage: (min: number, max: number) => string;
|
|
10
|
+
getMaxCharMessage: (max: number) => string;
|
|
11
|
+
VALID_POSITIVE_NUMBER: string;
|
|
12
|
+
VALID_POSITIVE_INTEGER: string;
|
|
13
|
+
MAX_SAFE_INTEGER: string;
|
|
14
|
+
};
|
|
5
15
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
6
16
|
export declare const validateDescription: (description: string) => ValidationResponseType;
|
|
7
17
|
export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
|