@kaio-xyz/design-system 1.1.26 → 1.1.27
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -159,12 +159,12 @@ declare const Checkbox: {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
type ClipboardProps = {
|
|
162
|
-
value
|
|
162
|
+
value?: string;
|
|
163
163
|
dataTest: string;
|
|
164
164
|
trim?: boolean;
|
|
165
165
|
trimLength?: number;
|
|
166
166
|
};
|
|
167
|
-
declare const Clipboard: ({
|
|
167
|
+
declare const Clipboard: ({ dataTest, value, trim, trimLength }: ClipboardProps) => react_jsx_runtime.JSX.Element;
|
|
168
168
|
|
|
169
169
|
type StepperProps = {
|
|
170
170
|
children: ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -525,9 +525,9 @@ var trimString = function (str, noOfChars) {
|
|
|
525
525
|
return "".concat(str.slice(0, noOfChars), "...").concat(str.slice(-noOfChars));
|
|
526
526
|
};
|
|
527
527
|
var Clipboard = function (_a) {
|
|
528
|
-
var
|
|
529
|
-
var
|
|
530
|
-
var
|
|
528
|
+
var dataTest = _a.dataTest, _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.trim, trim = _c === void 0 ? false : _c, _d = _a.trimLength, trimLength = _d === void 0 ? 4 : _d;
|
|
529
|
+
var _e = useState(false), isCopied = _e[0], setIsCopied = _e[1];
|
|
530
|
+
var _f = useState(false), isShowingCopy = _f[0], setIsShowingCopy = _f[1];
|
|
531
531
|
var displayValue = trim ? trimString(value, trimLength) : value;
|
|
532
532
|
var handleClick = useCallback(function () {
|
|
533
533
|
navigator.clipboard.writeText(value);
|