File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @launchpad-ui/components " : patch
3+ ---
4+
5+ Add ` toastMessage ` prop to ` CopyToClipboard ` to allow a customizeable toast message
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ type CopyToClipboardProps = {
1111 text : string ;
1212 tooltip ?: string ;
1313 showTooltip ?: boolean ;
14+ toastMessage ?: string ;
1415} ;
1516
1617export const CopyToClipboard = ( {
@@ -19,9 +20,10 @@ export const CopyToClipboard = ({
1920 text,
2021 tooltip = 'Copy to clipboard' ,
2122 showTooltip = true ,
23+ toastMessage = 'Copied!' ,
2224} : CopyToClipboardProps ) => {
2325 const handlePress = async ( ) => {
24- await copyToClipboard ( text , 'Copied!' ) ;
26+ await copyToClipboard ( text , toastMessage ) ;
2527 if ( onCopy ) {
2628 onCopy ( ) ;
2729 }
You can’t perform that action at this time.
0 commit comments