UNPKG

@hashicorp/design-system-components

Version:
28 lines (24 loc) 2.11 kB
import HdsAppSideNavListItem from './item.js'; import HdsIcon from '../../icon/index.js'; import HdsInteractive from '../../interactive/index.js'; import HdsBadge from '../../badge/index.js'; import HdsBadgeCount from '../../badge-count/index.js'; import { precompileTemplate } from '@ember/template-compilation'; import { setComponentTemplate } from '@ember/component'; import templateOnly from '@ember/component/template-only'; /** * Copyright IBM Corp. 2021, 2025 * SPDX-License-Identifier: MPL-2.0 */ const HdsAppSideNavListLink = setComponentTemplate(precompileTemplate("<HdsAppSideNavListItem>\n <HdsInteractive class=\"hds-app-side-nav__list-item-link {{if @isActive \"active\"}}\" @current-when={{@current-when}} @model={{@model}} @models={{@models}} @query={{@query}} @replace={{@replace}} @route={{@route}} @isRouteExternal={{@isRouteExternal}} @href={{@href}} @isHrefExternal={{@isHrefExternal}} aria-current={{if @isActive \"page\"}} ...attributes>\n {{#if @icon}}\n <HdsIcon class=\"hds-app-side-nav__list-item-icon-leading\" @name={{@icon}} />\n {{/if}}\n\n {{#if @text}}\n <span class=\"hds-app-side-nav__list-item-text hds-typography-body-200 hds-font-weight-medium\">\n {{@text}}\n </span>\n {{/if}}\n\n {{#if @count}}\n <HdsBadgeCount @text={{@count}} @type=\"outlined\" @size=\"small\" />\n {{/if}}\n\n {{#if @badge}}\n <HdsBadge @text={{@badge}} @type=\"outlined\" @size=\"small\" />\n {{/if}}\n\n {{yield}}\n\n {{#if @hasSubItems}}\n <span class=\"hds-app-side-nav__list-item-icon-trailing\">\n <HdsIcon @name=\"chevron-right\" />\n </span>\n {{/if}}\n {{#if @isHrefExternal}}\n <span class=\"hds-app-side-nav__list-item-icon-trailing\">\n <HdsIcon @name=\"external-link\" />\n </span>\n {{/if}}\n </HdsInteractive>\n</HdsAppSideNavListItem>", { strictMode: true, scope: () => ({ HdsAppSideNavListItem, HdsInteractive, HdsIcon, HdsBadgeCount, HdsBadge }) }), templateOnly()); export { HdsAppSideNavListLink as default }; //# sourceMappingURL=link.js.map