import React from 'react'; import classNames from 'classnames'; import { NestedNavigation as CoreNestedNavigation, useNestedNavigationContext } from '@shoptet/ui-core-web'; import type { Exact, SafeOmit } from '@shoptet/utils'; import { Divider } from '../Divider/Divider'; import { IconButton } from '../IconButton/IconButton'; import { getTypographyProps } from '../Typography/getTypographyProps'; export interface NestedNavigationHeaderInheritedDivProps extends SafeOmit< React.HTMLAttributes, 'children' | 'className' | 'title' > {} export interface NestedNavigationHeaderProps extends NestedNavigationHeaderInheritedDivProps {} export function NestedNavigationHeader({ ...rest }: NestedNavigationHeaderProps) { rest satisfies Exact; const { onBack } = useNestedNavigationContext(); const canGoBack = Boolean(onBack); return (
{({ props }) => ( )} {({ state }) => state.title} {({ props }) => ( )}
); }