diff --git a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx index bb70d7af704..d18b6a29c4e 100644 --- a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx +++ b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx @@ -47,6 +47,8 @@ export interface ClipboardCopyProps extends Omit isBlock?: boolean; /** Adds Clipboard Copy variant styles. */ variant?: typeof ClipboardCopyVariant | 'inline' | 'expansion' | 'inline-compact'; + /** Replaces the textinput text, useful for expansion variant when you want to provide a summary of the text that will be copied. Will force isReadOnly on the textInput part. */ + title?: string; /** Copy button tooltip position. */ position?: | TooltipPosition @@ -104,6 +106,7 @@ class ClipboardCopy extends React.Component )} ( + + This could be a lot of information that you'd want to summarize with a title as above. The title above will be + readonly as it was defined as a title rather than just the first part of this text. However, a user can still modify + this content which gets copied into the clipboard. You can use the isReadOnly flag to prevent them from changing + this. + +);