Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ export interface ClipboardCopyProps extends Omit<React.HTMLProps<HTMLDivElement>
exitDelay?: number;
/** Delay in ms before the tooltip appears. */
entryDelay?: number;
/** @deprecated Delay in ms before the tooltip message switch to hover tip. */
switchDelay?: number;
/** A function that is triggered on clicking the copy button. */
onCopy?: (event: React.ClipboardEvent<HTMLDivElement>, text?: React.ReactNode) => void;
/** A function that is triggered on changing the text. */
Expand All @@ -97,14 +95,6 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
expanded: this.props.isExpanded,
copied: false
};

if (this.props.switchDelay !== undefined) {
// eslint-disable-next-line no-console
console.warn(
'ClipboardCopy: switchDelay prop has been deprecated. ' +
'The tooltip message will switch back to the hover tip as soon as the tooltip is hidden.'
);
}
}

static defaultProps: PickOptional<ClipboardCopyProps> = {
Expand Down Expand Up @@ -156,7 +146,6 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
/* eslint-disable @typescript-eslint/no-unused-vars */
isExpanded,
onChange, // Don't pass to <div>
switchDelay,
/* eslint-enable @typescript-eslint/no-unused-vars */
isReadOnly,
isCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ it('ClipboardCopy should match snapshot (auto-generated)', () => {
maxWidth={"'150px'"}
exitDelay={1600}
entryDelay={100}
switchDelay={2000}
onCopy={(event: React.ClipboardEvent<HTMLDivElement>, text?: React.ReactNode) => {
const clipboard = event.currentTarget.parentElement;
const el = document.createElement('input');
Expand Down