@tap-payments/os-micro-frontend-shared 0.1.381-test.8 → 0.1.382-test.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.
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { memo
|
|
3
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import toast from 'react-hot-toast';
|
|
4
|
+
import { Icon } from '../../../index.js';
|
|
4
5
|
import { gadientLink } from '../../../../constants/index.js';
|
|
5
6
|
import { copyText } from '../../../../utils/index.js';
|
|
6
|
-
import { Chip
|
|
7
|
+
import { Chip } from './style';
|
|
7
8
|
function LinkCell({ url }) {
|
|
8
|
-
const [isCopyActive, setIsCopyActive] = useState(false);
|
|
9
9
|
const onClick = () => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
10
|
+
try {
|
|
11
|
+
copyText(url);
|
|
12
|
+
toast.success('Copied!');
|
|
13
|
+
}
|
|
14
|
+
catch (_a) {
|
|
15
|
+
toast.error('Failed to copy link');
|
|
16
|
+
}
|
|
18
17
|
};
|
|
19
18
|
if (!url)
|
|
20
19
|
return null;
|
|
21
|
-
return (_jsx(
|
|
20
|
+
return (_jsx(Chip, Object.assign({ onClick: onClick }, { children: _jsx(Icon, { src: gadientLink, alt: "link" }) })));
|
|
22
21
|
}
|
|
23
22
|
export default memo(LinkCell);
|
|
@@ -2,6 +2,3 @@
|
|
|
2
2
|
export declare const Chip: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
4
|
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
|
-
export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -10,10 +10,3 @@ export const Chip = styled(Box)(({ theme }) => ({
|
|
|
10
10
|
border: `1px solid ${theme.palette.divider}`,
|
|
11
11
|
cursor: 'pointer',
|
|
12
12
|
}));
|
|
13
|
-
export const TooltipWrapper = styled(Box)(() => ({
|
|
14
|
-
display: 'flex',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
fontSize: '12px',
|
|
18
|
-
gap: '4px',
|
|
19
|
-
}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.382-test.1",
|
|
5
|
+
"testVersion": 1,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|