@primer/react
Version:
An implementation of GitHub's Primer Design System using React
61 lines (60 loc) • 3.26 kB
TypeScript
import { TimelineBadgeVariants } from "./constants.js";
import React from "react";
//#region src/Timeline/Timeline.d.ts
type StyledTimelineProps = {
clipSidebar?: boolean | 'start' | 'end' | 'both';
className?: string;
};
type TimelineProps = StyledTimelineProps & Omit<React.ComponentPropsWithoutRef<'ol'>, 'role'>;
type StyledTimelineItemProps = {
condensed?: boolean;
className?: string;
};
/**
* @deprecated Use the `TimelineItemProps` type instead
*/
type TimelineItemsProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'li'>;
type TimelineItemProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'li'>;
type TimelineBadgeVariant = (typeof TimelineBadgeVariants)[number];
type TimelineBadgeProps = {
children?: React.ReactNode;
className?: string; /** The color variant of the badge */
variant?: TimelineBadgeVariant;
} & React.ComponentPropsWithoutRef<'div'>;
type TimelineBodyProps = {
/** Class name for custom styling */className?: string;
} & React.ComponentPropsWithoutRef<'div'>;
type TimelineBreakProps = {
/** Class name for custom styling */className?: string;
} & Omit<React.ComponentPropsWithoutRef<'li'>, 'role'>;
type TimelineActionsProps = {
/** Class name for custom styling */className?: string;
} & React.ComponentPropsWithoutRef<'div'>;
type TimelineAvatarProps = {
/** Class name for custom styling */className?: string;
} & React.ComponentPropsWithoutRef<'div'>;
declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLOListElement>> & {
Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
Avatar: React.ForwardRefExoticComponent<{
/** Class name for custom styling */className?: string;
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
Badge: {
({
className,
variant,
...props
}: TimelineBadgeProps): React.JSX.Element;
displayName: string;
};
Body: React.ForwardRefExoticComponent<{
/** Class name for custom styling */className?: string;
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
Break: React.ForwardRefExoticComponent<{
/** Class name for custom styling */className?: string;
} & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
Actions: React.ForwardRefExoticComponent<{
/** Class name for custom styling */className?: string;
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
};
//#endregion
export { TimelineActionsProps, TimelineAvatarProps, TimelineBadgeProps, TimelineBadgeVariant, TimelineBodyProps, TimelineBreakProps, TimelineItemProps, TimelineItemsProps, TimelineProps, _default as default };