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:
@@ -28,6 +28,7 @@ export const Spotlight = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<MantineSpotlight.Root
|
<MantineSpotlight.Root
|
||||||
|
yOffset={8}
|
||||||
onSpotlightClose={() => {
|
onSpotlightClose={() => {
|
||||||
setMode("help");
|
setMode("help");
|
||||||
setChildrenOptions(null);
|
setChildrenOptions(null);
|
||||||
@@ -64,6 +65,11 @@ export const Spotlight = () => {
|
|||||||
{activeMode.modeKey !== "help" ? <Kbd size="sm">{activeMode.character}</Kbd> : null}
|
{activeMode.modeKey !== "help" ? <Kbd size="sm">{activeMode.character}</Kbd> : null}
|
||||||
</Group>
|
</Group>
|
||||||
}
|
}
|
||||||
|
styles={{
|
||||||
|
section: {
|
||||||
|
pointerEvents: "all",
|
||||||
|
},
|
||||||
|
}}
|
||||||
rightSection={
|
rightSection={
|
||||||
mode === "help" ? undefined : (
|
mode === "help" ? undefined : (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const helpMode = {
|
|||||||
</Group>
|
</Group>
|
||||||
),
|
),
|
||||||
filter: () => true,
|
filter: () => true,
|
||||||
useInteraction: interaction.link(({ href }) => ({ href })),
|
useInteraction: interaction.link(({ href }) => ({ href, newTab: true })),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
} satisfies SearchMode;
|
} satisfies SearchMode;
|
||||||
|
|||||||
Reference in New Issue
Block a user