From 8c70f0fe3daa669de31ca9dc829d1261ac1918c6 Mon Sep 17 00:00:00 2001 From: gitdallas Date: Fri, 13 Oct 2023 10:05:53 -0500 Subject: [PATCH] fix clipboardcopyexpanded to work with string children Signed-off-by: gitdallas --- .../react-core/src/components/ClipboardCopy/ClipboardCopy.tsx | 4 ++-- .../src/components/ClipboardCopy/ClipboardCopyExpanded.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx index c05da1cd313..19b09117279 100644 --- a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx +++ b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx @@ -26,7 +26,7 @@ export interface ClipboardCopyState { copied: boolean; } -export interface ClipboardCopyProps extends Omit, 'onChange'>, OUIAProps { +export interface ClipboardCopyProps extends Omit, 'onChange' | 'children'>, OUIAProps { /** Additional classes added to the clipboard copy container. */ className?: string; /** Tooltip message to display when hover the copy button */ @@ -268,7 +268,7 @@ class ClipboardCopy extends React.Component - {this.state.text} + {this.state.text as string} )} diff --git a/packages/react-core/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx b/packages/react-core/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx index 8a82c3e0001..0c805495078 100644 --- a/packages/react-core/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx +++ b/packages/react-core/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx @@ -6,7 +6,6 @@ import { PickOptional } from '../../helpers/typeUtils'; export interface ClipboardCopyExpandedProps extends Omit { className?: string; - children: React.ReactNode; onChange?: (e: React.FormEvent, text: string) => void; isReadOnly?: boolean; isCode?: boolean;