@primer/react
Version:
An implementation of GitHub's Primer Design System using React
35 lines • 1.38 kB
TypeScript
import type { To } from 'history';
import type { ComponentProps } from './utils/types';
import { type LinkProps } from './Link';
import type React from 'react';
import { type PropsWithChildren } from 'react';
import type { SxProp } from './sx';
type SideNavBaseProps = {
as?: React.ElementType;
variant?: 'lightweight' | 'normal';
bordered?: boolean;
className?: string;
children?: React.ReactNode;
'aria-label'?: string;
} & SxProp;
declare function SideNav({ as, variant, className, bordered, children, 'aria-label': ariaLabel, sx: sxProp, }: SideNavBaseProps): React.JSX.Element;
type StyledSideNavLinkProps = PropsWithChildren<{
to?: To;
selected?: boolean;
variant?: 'full' | 'normal';
}> & LinkProps;
declare const SideNavLink: {
({ selected, to, variant, className, children, ...rest }: StyledSideNavLinkProps): React.JSX.Element;
displayName: string;
};
export type SideNavProps = ComponentProps<typeof SideNav>;
export type SideNavLinkProps = ComponentProps<typeof SideNavLink>;
/** @deprecated Use [NavList](https://primer.style/react/NavList) instead */
declare const _default: typeof SideNav & {
Link: {
({ selected, to, variant, className, children, ...rest }: StyledSideNavLinkProps): React.JSX.Element;
displayName: string;
};
};
export default _default;
//# sourceMappingURL=SideNav.d.ts.map