UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

24 lines (23 loc) 1.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BreadcrumbsLink = exports.breadcrumbsLinkStencil = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const common_1 = require("@workday/canvas-kit-react/common"); const button_1 = require("@workday/canvas-kit-react/button"); const tooltip_1 = require("@workday/canvas-kit-react/tooltip"); const canvas_tokens_web_1 = require("@workday/canvas-tokens-web"); const canvas_kit_styling_1 = require("@workday/canvas-kit-styling"); exports.breadcrumbsLinkStencil = (0, canvas_kit_styling_1.createStencil)({ vars: { maxWidth: '', }, base: { name: "3yqhc5", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-large);font-size:var(--cnvs-sys-font-size-subtext-large);letter-spacing:var(--cnvs-base-letter-spacing-150);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:var(--maxWidth-breadcrumbs-link-3d9ed7);" } }, "breadcrumbs-link-3d9ed7"); exports.BreadcrumbsLink = (0, common_1.createComponent)('a')({ displayName: 'Breadcrumbs.Link', Component: ({ maxWidth = 350, href, tooltipProps = {}, children, ...elemProps }, ref, Element) => { return ((0, jsx_runtime_1.jsx)(tooltip_1.OverflowTooltip, { ...tooltipProps, children: (0, jsx_runtime_1.jsx)(button_1.Hyperlink, { href: href, ref: ref, as: Element, role: "link", variant: "standalone", ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, (0, exports.breadcrumbsLinkStencil)({ maxWidth: typeof maxWidth === 'number' ? (0, canvas_kit_styling_1.px2rem)(maxWidth) : maxWidth, })), children: children }) })); }, });