@octopusdeploy/design-system-components
Version:
The design systems component library.
16 lines (15 loc) • 877 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.bold = exports.code = exports.externalLink = exports.link = void 0;
// Internal routing link (resolved through the routing-aware DesignSystemLink). `url` is a
// DesignSystemLinkHref, which accepts plain path strings such as "/docs".
const link = (text, url, newTab = false) => ({ type: "link", text, url, newTab });
exports.link = link;
// External link (a short slug resolved via the oc.to redirector, or a full URL). Rendered through
// ExternalLink so it gets short-name resolution, the external-link icon, and link analytics.
const externalLink = (text, href) => ({ type: "externalLink", text, href });
exports.externalLink = externalLink;
const code = (text) => ({ type: "inline-code", text });
exports.code = code;
const bold = (text) => ({ type: "bold", text });
exports.bold = bold;