Skip to content

Commit

Permalink
feat: add reset hover tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed Feb 16, 2025
1 parent eeaf72f commit 185dd66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website/src/components/Playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import EnvDisplay from './EnvDisplay.vue'
import { initializeParser, useAstGrep, Mode as ModeImport } from './astGrep'
// important initialization
// await initializeParser()
await initializeParser()
const {
state,
Expand Down
13 changes: 12 additions & 1 deletion website/src/components/ResetConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const emits = defineEmits<{
</script>

<template>
<button class="reset" title="Reset your config" @click="emits('reset')">
<button class="reset" data-title="Reset your config" @click="emits('reset')">
<IconReset />
</button>
</template>
Expand All @@ -23,4 +23,15 @@ const emits = defineEmits<{
align-items: center;
background: transparent;
}
.reset[data-title]:before {
left: 50%;
top: -8px;
transform: translateX(-50%);
border-top-color: rgba(0, 0, 0, 0.5);
}
[data-title]:after {
left: 50%;
top: -8px;
transform: translate(-80%, -100%);
}
</style>

0 comments on commit 185dd66

Please sign in to comment.