UNPKG

@primer/react-brand

Version:

Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.

31 lines (30 loc) 1.84 kB
import React, { PropsWithChildren } from 'react'; import { LinkProps } from '../Link'; import { HeadingProps } from '../Heading'; import { LabelProps } from '../Label'; import type { BaseProps } from '../component-helpers'; export type SectionIntroProps = { align?: 'start' | 'center'; fullWidth?: boolean; /** * Escape-hatch for inserting custom React components. * Warning: * This prop isn't advertised in our docs but remains part of the public API for edge-cases. * Need to use this prop? Please check in with #primer-brand first to confirm correct usage. */ leadingComponent?: React.FunctionComponent; } & React.HTMLAttributes<HTMLHeadingElement> & BaseProps<HTMLHeadingElement>; type SectionIntroHeadingProps = BaseProps<HTMLHeadingElement> & HeadingProps; type SectionIntroDescriptionProps = BaseProps<HTMLParagraphElement> & { children: React.ReactNode | React.ReactNode[]; }; type SectionIntroLabelProps = LabelProps & BaseProps<HTMLDivElement>; declare function _Label({ children, ...rest }: PropsWithChildren<SectionIntroLabelProps>): import("react/jsx-runtime").JSX.Element; type SectionIntroLinkProps = Omit<LinkProps, 'size'> & BaseProps<HTMLAnchorElement>; export declare const SectionIntro: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<SectionIntroProps>, "ref"> & React.RefAttributes<HTMLHeadingElement>> & { Heading: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<SectionIntroHeadingProps>, "ref"> & React.RefAttributes<HTMLHeadingElement>>; Description: React.ForwardRefExoticComponent<Omit<SectionIntroDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>; Link: React.ForwardRefExoticComponent<Omit<SectionIntroLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>; Label: typeof _Label; }; export {};