diff --git a/app/components/Base/CliSnippet.vue b/app/components/Base/CliSnippet.vue index 6403b59c..dbfc2f25 100644 --- a/app/components/Base/CliSnippet.vue +++ b/app/components/Base/CliSnippet.vue @@ -10,6 +10,14 @@ const props = withDefaults( ); const isCopied = ref(false); +const el = ref(null); + +const onMouseMove = (e: MouseEvent) => { + if (!el.value) return; + const rect = el.value.getBoundingClientRect(); + el.value.style.setProperty('--mouse-x', `${e.clientX - rect.left}px`); + el.value.style.setProperty('--mouse-y', `${e.clientY - rect.top}px`); +}; const commandParts = computed(() => { const firstSpaceIndex = props.command.indexOf(' '); @@ -47,8 +55,10 @@ const handleClick = () => { @@ -155,6 +155,7 @@ autoApply(`[data-block-id="${props.uuid}"]`, refresh); width: 100%; max-width: 470px; margin-inline: auto; + margin-block-start: var(--space-6); } .align-center {