@primer/react-brand
Version:
Primer Brand is a GitHub's design system for creating React-based marketing websites and digital experiences.
33 lines (32 loc) • 1.92 kB
TypeScript
import React from 'react';
import { LinkProps } from '../Link';
import { HeadingProps } from '../Heading';
import { TextProps } from '../Text';
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[];
};
export type SectionIntroLabelProps = Omit<TextProps, 'as' | 'ref' | 'animate'> & Omit<BaseProps<HTMLSpanElement>, 'animate'> & {
animate?: boolean;
animationDelay?: number;
};
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: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<SectionIntroLabelProps>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
};
export {};