fix(spotlight): x button not clickable, help links open in current tab, bad screen usage on mobile (#1199)

* fix: spotlight help links should open in new tab

* fix: x button is not clickable in spotlight

* fix: reduce offset for spotlight, to improve screen usage on mobile
This commit is contained in:
Meier Lukas
2024-09-28 23:30:09 +02:00
committed by GitHub
parent 08c6303fa6
commit 42a49e6461
2 changed files with 7 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ export const Spotlight = () => {
return (
<MantineSpotlight.Root
yOffset={8}
onSpotlightClose={() => {
setMode("help");
setChildrenOptions(null);
@@ -64,6 +65,11 @@ export const Spotlight = () => {
{activeMode.modeKey !== "help" ? <Kbd size="sm">{activeMode.character}</Kbd> : null}
</Group>
}
styles={{
section: {
pointerEvents: "all",
},
}}
rightSection={
mode === "help" ? undefined : (
<ActionIcon

View File

@@ -66,7 +66,7 @@ const helpMode = {
</Group>
),
filter: () => true,
useInteraction: interaction.link(({ href }) => ({ href })),
useInteraction: interaction.link(({ href }) => ({ href, newTab: true })),
}),
],
} satisfies SearchMode;