docs,api-ref: design + algolia fixes (#4775)
* fix algolia results on same page * fix navigation bar for mobile * fix eslint configurations * fix github action * fix search icon on mobile * fix code block dark mode
This commit is contained in:
@@ -17,6 +17,7 @@ const NavbarActions: React.FC<NavbarActionsProps> = ({
|
||||
<div className={clsx("lg:block hidden", className)}>
|
||||
{items.map((item, index) => {
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
const ItemIconElm = item.Icon
|
||||
const ItemIcon = item.icon ? Icon[item.icon] : null
|
||||
switch (item.type) {
|
||||
case "link":
|
||||
@@ -31,11 +32,12 @@ const NavbarActions: React.FC<NavbarActionsProps> = ({
|
||||
href={item.href}
|
||||
title={item.title}
|
||||
className={clsx(
|
||||
ItemIcon && "navbar-action-icon-item",
|
||||
(ItemIcon || ItemIconElm) && "navbar-action-icon-item",
|
||||
item.className
|
||||
)}
|
||||
>
|
||||
{item.label}
|
||||
{ItemIconElm}
|
||||
{ItemIcon && <ItemIcon />}
|
||||
</a>
|
||||
</Tooltip>
|
||||
@@ -50,12 +52,13 @@ const NavbarActions: React.FC<NavbarActionsProps> = ({
|
||||
>
|
||||
<button
|
||||
className={clsx(
|
||||
ItemIcon && "navbar-action-icon-item",
|
||||
(ItemIcon || ItemIconElm) && "navbar-action-icon-item",
|
||||
item.className
|
||||
)}
|
||||
{...item.events}
|
||||
>
|
||||
{item.label}
|
||||
{ItemIconElm}
|
||||
{ItemIcon && <ItemIcon />}
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user