@octopusdeploy/design-system-components
Version:
The design systems component library.
31 lines (30 loc) • 1.36 kB
TypeScript
import * as React from "react";
import type { DesignSystemLinkHref } from "../../routing";
export type CalloutLink = {
type: "link";
text: string;
url: DesignSystemLinkHref;
newTab?: boolean;
};
export type CalloutInlineCode = {
type: "inline-code";
text: string;
};
export type CalloutBoldContent = {
type: "bold";
text: string;
};
export type CalloutExternalLink = {
type: "externalLink";
text: string;
href: string;
};
export type CalloutContent = Array<string | CalloutLink | CalloutExternalLink | CalloutContent | CalloutInlineCode | CalloutBoldContent>;
export declare const calloutLink: (text: string, url: DesignSystemLinkHref, newTab?: boolean) => CalloutLink | "";
export declare const calloutExternalLink: (text: string, href: string) => CalloutExternalLink;
export declare const calloutInlineCode: (text: string) => CalloutInlineCode;
export declare const calloutBoldText: (text: string) => CalloutBoldContent;
type CalloutContentValue = string | number | boolean | null | undefined | CalloutLink | CalloutExternalLink | CalloutContent | CalloutInlineCode | CalloutBoldContent;
export declare const calloutContent: (strings: TemplateStringsArray, ...values: CalloutContentValue[]) => CalloutContent;
export declare const renderCalloutContent: (content: CalloutContent) => React.ReactElement;
export {};