UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

57 lines (56 loc) 2.68 kB
import { AriaRole } from "../utils/types/AriaRole.js"; import { FCWithSlotMarker } from "../utils/types/Slots.js"; import { ForwardRefComponent } from "../utils/polymorphic.js"; import { ResponsiveValue } from "../hooks/useResponsiveValue.js"; import { LinkProps as LinkProps$1 } from "../Link/Link.js"; import React from "react"; //#region src/PageHeader/PageHeader.d.ts type ChildrenPropTypes = { className?: string; hidden?: boolean | ResponsiveValue<boolean>; }; type PageHeaderProps = { 'aria-label'?: React.AriaAttributes['aria-label']; as?: React.ElementType | 'header' | 'div'; className?: string; role?: AriaRole; hasBorder?: boolean; }; type LinkProps = Pick<React.AnchorHTMLAttributes<HTMLAnchorElement> & LinkProps$1, 'download' | 'href' | 'hrefLang' | 'media' | 'ping' | 'rel' | 'target' | 'type' | 'referrerPolicy' | 'as'> & { 'aria-label'?: React.AriaAttributes['aria-label']; }; type ParentLinkProps = React.PropsWithChildren<ChildrenPropTypes & LinkProps>; type TitleAreaProps = { variant?: 'subtitle' | 'medium' | 'large' | ResponsiveValue<'subtitle' | 'medium' | 'large'>; } & ChildrenPropTypes; type TitleProps = { as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; } & ChildrenPropTypes; type ActionsProps = React.PropsWithChildren<ChildrenPropTypes>; type NavigationProps = { as?: 'nav' | 'div'; 'aria-label'?: React.AriaAttributes['aria-label']; 'aria-labelledby'?: React.AriaAttributes['aria-labelledby']; } & ChildrenPropTypes; declare const PageHeader: ForwardRefComponent<"div", PageHeaderProps> & { ContextArea: FCWithSlotMarker<React.PropsWithChildren<ChildrenPropTypes>>; ParentLink: ForwardRefComponent<"a", ParentLinkProps>; ContextBar: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; TitleArea: ForwardRefComponent<"div", TitleAreaProps>; ContextAreaActions: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; LeadingAction: FCWithSlotMarker<React.PropsWithChildren<ChildrenPropTypes>>; Breadcrumbs: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; LeadingVisual: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; Title: React.FC<React.PropsWithChildren<TitleProps>>; TrailingVisual: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; TrailingAction: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; Actions: ({ children, className, hidden }: ActionsProps) => React.JSX.Element; Description: React.FC<React.PropsWithChildren<ChildrenPropTypes>>; Navigation: React.FC<React.PropsWithChildren<NavigationProps>>; }; //#endregion export { ActionsProps, ChildrenPropTypes, NavigationProps, PageHeader, PageHeaderProps, ParentLinkProps, TitleAreaProps, TitleProps };