react-code-block
Version:
Set of unstyled UI components to build powerful code blocks in React.
14 lines (13 loc) • 385 B
TypeScript
export interface BaseContextProps {
lines: (number | string)[];
words: [string, [number, number]][];
}
export interface BaseLineContextProps {
lineNumber: number;
}
export type WithAsProp<T extends React.ElementType, U extends Object> = ({
as?: T;
} & U) & Omit<React.ComponentPropsWithoutRef<T>, keyof U>;
export interface WithDisplayName {
displayName: string;
}