File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/Frontend/src/components Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 22import { Tippy , TippyComponent } from " vue-tippy" ;
33import { useTemplateRef } from " vue" ;
44
5- const props = defineProps <{
6- value: string ;
7- }>();
5+ const props = defineProps ({
6+ value: {
7+ type: String ,
8+ required: true ,
9+ },
10+ isIconOnly: {
11+ type: Boolean ,
12+ default: false , // Default value
13+ },
14+ });
815
916const tippyRef = useTemplateRef <TippyComponent | null >(" tippyRef" );
1017let timeoutId: number ;
@@ -19,6 +26,6 @@ async function copyToClipboard() {
1926
2027<template >
2128 <Tippy content =" Copied" ref =" tippyRef" trigger =" manual" >
22- <button type =" button" class =" btn btn-secondary btn-sm" @click =" copyToClipboard" ><i class =" fa fa-copy" ></i > Copy to clipboard</button >
29+ <button type =" button" class =" btn btn-secondary btn-sm" @click =" copyToClipboard" ><i class =" fa fa-copy" ></i > < span v-if = " !props.isIconOnly " > Copy to clipboard</ span > </button >
2330 </Tippy >
2431</template >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const toggleHover = (index: number, state: boolean) => {
2121 <td class =" toolbar" >
2222 <div style =" display : flex ; align-items : center " @mouseover =" toggleHover(index, true)" @mouseleave =" toggleHover(index, false)" >
2323 <pre >{{ header.value }}</pre >
24- <CopyToClipboard v-if =" hoverStates[index]" :value =" header.value || ''" />
24+ <CopyToClipboard v-if =" hoverStates[index]" :value =" header.value || ''" :isIconOnly = " true " />
2525 </div >
2626 </td >
2727 </tr >
You can’t perform that action at this time.
0 commit comments