From 9252f4debc8f22bdb2ed3f8e201ab64981c02f1d Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Mon, 27 Mar 2023 16:47:21 +0800 Subject: [PATCH] fix: styles in links --- .../src/components/Command/Command.utils.tsx | 68 +++++++++++-------- .../ui/src/components/Command/DocsSearch.tsx | 4 +- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsx index f9f601d1bf0..97c2a89408f 100644 --- a/packages/ui/src/components/Command/Command.utils.tsx +++ b/packages/ui/src/components/Command/Command.utils.tsx @@ -178,7 +178,7 @@ type CommandPrimitiveItemElement = React.ElementRef export interface CommandItemProps extends CommandPrimitiveItemProps { - type: 'link' | 'command' + type: 'link' | 'block-link' | 'command' } export const CommandItem = React.forwardRef( @@ -186,42 +186,54 @@ export const CommandItem = React.forwardRef { forceMount key={`${page.meta.title}-item-index-${i}`} value={`${page.meta.title}-item-index-${i}`} - type="link" + type="block-link" onSelect={() => { // TODO: replace with Next.js router/Link when cross-project link logic solved window.location.assign(`/docs/${page.path}`) @@ -196,7 +196,7 @@ const DocsSearch = () => { }} key={`${page.meta.title}__${section.heading}-item-index-${i}`} value={`${page.meta.title}__${section.heading}-item-index-${i}`} - type="link" + type="block-link" >