UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

22 lines (21 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BreadcrumbsLink = 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 tokens_1 = require("@workday/canvas-kit-react/tokens"); const { color, ...subtextLargeStyles } = tokens_1.type.levels.subtext.large; const StyledLink = (0, common_1.styled)(button_1.Hyperlink)({ ...subtextLargeStyles, }, ({ maxWidth }) => ({ ...common_1.ellipsisStyles, maxWidth, })); exports.BreadcrumbsLink = (0, common_1.createComponent)('a')({ displayName: 'Breadcrumbs.Link', Component: ({ maxWidth = 350, href, tooltipProps = {}, children, ...props }) => { return ((0, jsx_runtime_1.jsx)(tooltip_1.OverflowTooltip, { ...tooltipProps, children: (0, jsx_runtime_1.jsx)(StyledLink, { maxWidth: maxWidth, href: href, role: "link", ...props, children: children }) })); }, });