Skip to content

Commit 185dd66

Browse files
feat: add reset hover tooltip
1 parent eeaf72f commit 185dd66

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

website/src/components/Playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import EnvDisplay from './EnvDisplay.vue'
1111
import { initializeParser, useAstGrep, Mode as ModeImport } from './astGrep'
1212
1313
// important initialization
14-
// await initializeParser()
14+
await initializeParser()
1515
1616
const {
1717
state,

website/src/components/ResetConfig.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const emits = defineEmits<{
77
</script>
88

99
<template>
10-
<button class="reset" title="Reset your config" @click="emits('reset')">
10+
<button class="reset" data-title="Reset your config" @click="emits('reset')">
1111
<IconReset />
1212
</button>
1313
</template>
@@ -23,4 +23,15 @@ const emits = defineEmits<{
2323
align-items: center;
2424
background: transparent;
2525
}
26+
.reset[data-title]:before {
27+
left: 50%;
28+
top: -8px;
29+
transform: translateX(-50%);
30+
border-top-color: rgba(0, 0, 0, 0.5);
31+
}
32+
[data-title]:after {
33+
left: 50%;
34+
top: -8px;
35+
transform: translate(-80%, -100%);
36+
}
2637
</style>

0 commit comments

Comments
 (0)