@connectif/ui-components 2.0.5 → 2.0.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.
|
@@ -4,6 +4,10 @@ export type TableCellCopyProps = TableCellProps & {
|
|
|
4
4
|
* Text to show
|
|
5
5
|
*/
|
|
6
6
|
text: string;
|
|
7
|
+
/**
|
|
8
|
+
* Text to be copied. If it doesn't exists, text will be used instead
|
|
9
|
+
*/
|
|
10
|
+
textToCopy?: string;
|
|
7
11
|
};
|
|
8
|
-
declare const TableCellCopy: ({ text, ...rest }: TableCellCopyProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const TableCellCopy: ({ text, textToCopy, ...rest }: TableCellCopyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
13
|
export default TableCellCopy;
|
package/dist/index.js
CHANGED
|
@@ -25313,12 +25313,12 @@ var TableCell_default = TableCell;
|
|
|
25313
25313
|
// src/components/table/TableCellCopy.tsx
|
|
25314
25314
|
import * as React83 from "react";
|
|
25315
25315
|
import { jsx as jsx156 } from "react/jsx-runtime";
|
|
25316
|
-
var TableCellCopy = ({ text, ...rest }) => {
|
|
25316
|
+
var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
25317
25317
|
const { t } = useTranslation();
|
|
25318
25318
|
const [isCopied, setIsCopied] = React83.useState(false);
|
|
25319
25319
|
const [showIcon, setShowIcon] = React83.useState(false);
|
|
25320
25320
|
const manageButtonClicked = () => {
|
|
25321
|
-
void navigator.clipboard.writeText(text);
|
|
25321
|
+
void navigator.clipboard.writeText(textToCopy ?? text);
|
|
25322
25322
|
if (isCopied) {
|
|
25323
25323
|
return;
|
|
25324
25324
|
}
|