UNPKG

@hypothesis/frontend-shared

Version:

Shared components, styles and utilities for Hypothesis projects

59 lines (58 loc) 1.79 kB
declare namespace _default { export { Changelog }; export { ChangelogItem }; export { Code }; export { Usage }; } export default _default; /** * Render a little label or pill next to changelog items */ export type ChangeStatus = 'breaking' | 'added' | 'changed' | 'deprecated'; /** * Wrapper around a list of changelog items * * @param {object} props * @param {import('preact').ComponentChildren} props.children */ declare function Changelog({ children }: { children: import('preact').ComponentChildren; }): import("preact").JSX.Element; /** * Single changelog item * * @param {object} props * @param {ChangeStatus} props.status * @param {import('preact').ComponentChildren} props.children */ declare function ChangelogItem({ status, children }: { status: ChangeStatus; children: import('preact').ComponentChildren; }): import("preact").JSX.Element; /** * Render provided `content` as a "code block" example. * * @param {object} props * @param {string} props.content - Code content * @param {'sm'|'md'|'lg'} [props.size] * @param {string} [props.title] - Caption (e.g. filename, description) of * code block */ declare function Code({ content, size, title }: { content: string; size?: "sm" | "md" | "lg" | undefined; title?: string | undefined; }): import("preact").JSX.Element; /** * Render import "usage" of a given `componentName` * * @param {object} props * @param {string} props.componentName * @param {'next'|'legacy'} [props.generation] * @param {'sm'|'md'|'lg'} [props.size] */ declare function Usage({ componentName, generation, size }: { componentName: string; generation?: "next" | "legacy" | undefined; size?: "sm" | "md" | "lg" | undefined; }): import("preact").JSX.Element;