@@ -10,7 +10,7 @@ import { ClipboardCopyToggle } from './ClipboardCopyToggle';
1010import { ClipboardCopyExpanded } from './ClipboardCopyExpanded' ;
1111import { getOUIAProps , OUIAProps } from '../../helpers' ;
1212
13- export const clipboardCopyFunc = ( event : React . ClipboardEvent < HTMLDivElement > , text ?: string ) => {
13+ export const clipboardCopyFunc = ( event : React . ClipboardEvent < HTMLDivElement > , text ?: React . ReactNode ) => {
1414 navigator . clipboard . writeText ( text . toString ( ) ) ;
1515} ;
1616
@@ -27,7 +27,7 @@ export interface ClipboardCopyState {
2727 textWhenExpanded : string ;
2828}
2929
30- export interface ClipboardCopyProps extends Omit < React . HTMLProps < HTMLDivElement > , 'onChange' | 'children' > , OUIAProps {
30+ export interface ClipboardCopyProps extends Omit < React . HTMLProps < HTMLDivElement > , 'onChange' > , OUIAProps {
3131 /** Additional classes added to the clipboard copy container. */
3232 className ?: string ;
3333 /** Tooltip message to display when hover the copy button */
@@ -71,12 +71,12 @@ export interface ClipboardCopyProps extends Omit<React.HTMLProps<HTMLDivElement>
7171 /** Delay in ms before the tooltip appears. */
7272 entryDelay ?: number ;
7373 /** A function that is triggered on clicking the copy button. */
74- onCopy ?: ( event : React . ClipboardEvent < HTMLDivElement > , text ?: string ) => void ;
74+ onCopy ?: ( event : React . ClipboardEvent < HTMLDivElement > , text ?: React . ReactNode ) => void ;
7575 /** A function that is triggered on changing the text. */
7676 onChange ?: ( event : React . FormEvent , text ?: string ) => void ;
7777 /** The text which is copied. */
78- children : string ;
79- /** Additional actions for inline clipboard copy. Should be wrapped with ClipboardCopyAction. */
78+ children : React . ReactNode ;
79+ /** Additional actions for inline-compact clipboard copy. Should be wrapped with ClipboardCopyAction. */
8080 additionalActions ?: React . ReactNode ;
8181 /** Value to overwrite the randomly generated data-ouia-component-id.*/
8282 ouiaId ?: number | string ;
0 commit comments