docs: preparations for preview (#7267)
* configured base paths + added development banner * fix typelist site url * added navbar and sidebar badges * configure algolia filters * remove AI assistant * remove unused imports * change navbar text and badge * lint fixes * fix build error * add to api reference rewrites * fix build error * fix build errors in user-guide * fix feedback component * add parent title to pagination * added breadcrumbs component * remove user-guide links * resolve todos * fix details about authentication * change documentation title * lint content
This commit is contained in:
@@ -16,6 +16,8 @@ export type SidebarItemProps = {
|
||||
expandItems?: boolean
|
||||
currentLevel?: number
|
||||
isSidebarTitle?: boolean
|
||||
sidebarHasParent?: boolean
|
||||
isMobile?: boolean
|
||||
} & React.AllHTMLAttributes<HTMLLIElement>
|
||||
|
||||
export const SidebarItem = ({
|
||||
@@ -24,6 +26,8 @@ export const SidebarItem = ({
|
||||
expandItems = false,
|
||||
className,
|
||||
currentLevel = 1,
|
||||
sidebarHasParent = false,
|
||||
isMobile = false
|
||||
}: SidebarItemProps) => {
|
||||
const [showLoading, setShowLoading] = useState(false)
|
||||
const {
|
||||
@@ -34,8 +38,8 @@ export const SidebarItem = ({
|
||||
sidebarRef,
|
||||
} = useSidebar()
|
||||
const active = useMemo(
|
||||
() => isItemActive(item, nested),
|
||||
[isItemActive, item, nested]
|
||||
() => !isMobile && isItemActive(item, nested),
|
||||
[isItemActive, item, nested, isMobile]
|
||||
)
|
||||
const collapsed = !expandItems && !isItemActive(item, true)
|
||||
const ref = useRef<HTMLLIElement>(null)
|
||||
@@ -131,7 +135,11 @@ export const SidebarItem = ({
|
||||
return (
|
||||
<li
|
||||
className={clsx(
|
||||
canHaveTitleStyling && !collapsed && "my-docs_1.5",
|
||||
canHaveTitleStyling &&
|
||||
!collapsed && [
|
||||
!sidebarHasParent && "my-docs_1.5",
|
||||
sidebarHasParent && "[&:not(:first-child)]:my-docs_1.5",
|
||||
],
|
||||
!canHaveTitleStyling &&
|
||||
!nested &&
|
||||
active &&
|
||||
|
||||
Reference in New Issue
Block a user