@redocly/theme 0.9.6 → 0.9.7
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/lib/CopyButton/CopyButtonWrapper.js +1 -1
- package/lib/Search/Autocomplete.js +1 -1
- package/lib/utils/ClipboardService.d.ts +0 -1
- package/lib/utils/ClipboardService.js +0 -3
- package/package.json +1 -1
- package/src/CopyButton/CopyButtonWrapper.tsx +1 -6
- package/src/Search/Autocomplete.tsx +1 -1
- package/src/utils/ClipboardService.ts +0 -4
|
@@ -44,7 +44,7 @@ function CopyButtonWrapperComponent({ data, children, onCopyClick, dataTestId =
|
|
|
44
44
|
onCopyClick === null || onCopyClick === void 0 ? void 0 : onCopyClick();
|
|
45
45
|
};
|
|
46
46
|
const renderCopyButton = (placement = 'top') => {
|
|
47
|
-
return (react_1.default.createElement(Tooltip_1.Tooltip, { className: "copy-button", tip:
|
|
47
|
+
return (react_1.default.createElement(Tooltip_1.Tooltip, { className: "copy-button", tip: "Copied", isOpen: tooltip.isOpened, placement: placement },
|
|
48
48
|
react_1.default.createElement(SamplesPanelControls_1.SamplesControlButton, { onClick: copy, "data-cy": dataTestId }, "Copy")));
|
|
49
49
|
};
|
|
50
50
|
return children({ renderCopyButton });
|
|
@@ -117,6 +117,6 @@ const Overlay = styled_components_1.default.div `
|
|
|
117
117
|
`;
|
|
118
118
|
const Message = styled_components_1.default.div `
|
|
119
119
|
padding: 24px;
|
|
120
|
-
color: var(--text-color);
|
|
120
|
+
color: var(--search-item-title-text-color);
|
|
121
121
|
`;
|
|
122
122
|
//# sourceMappingURL=Autocomplete.js.map
|
|
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ClipboardService = void 0;
|
|
7
7
|
const copy_to_clipboard_1 = __importDefault(require("copy-to-clipboard"));
|
|
8
8
|
class ClipboardService {
|
|
9
|
-
static isSupported() {
|
|
10
|
-
return typeof navigator !== 'undefined' && !!navigator.clipboard;
|
|
11
|
-
}
|
|
12
9
|
static copyCustom(text) {
|
|
13
10
|
return (0, copy_to_clipboard_1.default)(text);
|
|
14
11
|
}
|
package/package.json
CHANGED
|
@@ -41,12 +41,7 @@ function CopyButtonWrapperComponent({
|
|
|
41
41
|
|
|
42
42
|
const renderCopyButton = (placement: TooltipProps['placement'] = 'top'): JSX.Element => {
|
|
43
43
|
return (
|
|
44
|
-
<Tooltip
|
|
45
|
-
className="copy-button"
|
|
46
|
-
tip={ClipboardService.isSupported() ? 'Copied' : 'Not supported in your browser'}
|
|
47
|
-
isOpen={tooltip.isOpened}
|
|
48
|
-
placement={placement}
|
|
49
|
-
>
|
|
44
|
+
<Tooltip className="copy-button" tip="Copied" isOpen={tooltip.isOpened} placement={placement}>
|
|
50
45
|
<SamplesControlButton onClick={copy} data-cy={dataTestId}>
|
|
51
46
|
Copy
|
|
52
47
|
</SamplesControlButton>
|