Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Remove LinkTo yield
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfries committed Feb 2, 2024
1 parent 1257730 commit 9a92751
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 66 deletions.
8 changes: 1 addition & 7 deletions addon/components/bs/nav.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
import BsBaseComponent from './base';

import type { LinkToKeyword } from '@glint/environment-ember-loose/-private/intrinsics/link-to';

export interface BsNavComponentSignature {
Element: HTMLElement;
Args: {
tabs?: boolean;
pills?: boolean;
};
Blocks: {
default: [
{
'link-to': LinkToKeyword;
}
];
default: [];
};
}

Expand Down
94 changes: 47 additions & 47 deletions tests/dummy/app/templates/components.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,76 @@

<div class="row">
<div class="col-2">
<Bs::Nav @pills={{true}} class="flex-column" as |nav|>
<nav.link-to @route="components.accordion" class="nav-link">
<Bs::Nav @pills={{true}} class="flex-column">
<LinkTo @route="components.accordion" class="nav-link">
Accordion
</nav.link-to>
<nav.link-to @route="components.alerts" class="nav-link">
</LinkTo>
<LinkTo @route="components.alerts" class="nav-link">
Alerts
</nav.link-to>
<nav.link-to @route="components.badge" class="nav-link">
</LinkTo>
<LinkTo @route="components.badge" class="nav-link">
Badge
</nav.link-to>
<nav.link-to @route="components.breadcrumb" class="nav-link">
</LinkTo>
<LinkTo @route="components.breadcrumb" class="nav-link">
Breadcrumb
</nav.link-to>
<nav.link-to @route="components.buttons" class="nav-link">
</LinkTo>
<LinkTo @route="components.buttons" class="nav-link">
Buttons
</nav.link-to>
<nav.link-to @route="components.button-group" class="nav-link">
</LinkTo>
<LinkTo @route="components.button-group" class="nav-link">
Button group
</nav.link-to>
<nav.link-to @route="components.card" class="nav-link">
</LinkTo>
<LinkTo @route="components.card" class="nav-link">
Card
</nav.link-to>
<nav.link-to @route="components.carousel" class="nav-link">
</LinkTo>
<LinkTo @route="components.carousel" class="nav-link">
Carousel
</nav.link-to>
<nav.link-to @route="components.close-button" class="nav-link">
</LinkTo>
<LinkTo @route="components.close-button" class="nav-link">
Close button
</nav.link-to>
<nav.link-to @route="components.collapse" class="nav-link">
</LinkTo>
<LinkTo @route="components.collapse" class="nav-link">
Collapse
</nav.link-to>
<nav.link-to @route="components.dropdowns" class="nav-link">
</LinkTo>
<LinkTo @route="components.dropdowns" class="nav-link">
Dropdowns
</nav.link-to>
<nav.link-to @route="components.list-group" class="nav-link">
</LinkTo>
<LinkTo @route="components.list-group" class="nav-link">
List group
</nav.link-to>
<nav.link-to @route="components.modal" class="nav-link">
</LinkTo>
<LinkTo @route="components.modal" class="nav-link">
Modal
</nav.link-to>
<nav.link-to @route="components.navbar" class="nav-link">
</LinkTo>
<LinkTo @route="components.navbar" class="nav-link">
Navbar
</nav.link-to>
<nav.link-to @route="components.navs-tabs" class="nav-link">
</LinkTo>
<LinkTo @route="components.navs-tabs" class="nav-link">
Navs & tabs
</nav.link-to>
<nav.link-to @route="components.offcanvas" class="nav-link">
</LinkTo>
<LinkTo @route="components.offcanvas" class="nav-link">
Offcanvas
</nav.link-to>
<nav.link-to @route="components.pagination" class="nav-link">
</LinkTo>
<LinkTo @route="components.pagination" class="nav-link">
Pagination
</nav.link-to>
<nav.link-to @route="components.placeholders" class="nav-link">
</LinkTo>
<LinkTo @route="components.placeholders" class="nav-link">
Placeholders
</nav.link-to>
<nav.link-to @route="components.popovers" class="nav-link">
</LinkTo>
<LinkTo @route="components.popovers" class="nav-link">
Popovers
</nav.link-to>
<nav.link-to @route="components.progress" class="nav-link">
</LinkTo>
<LinkTo @route="components.progress" class="nav-link">
Progress
</nav.link-to>
<nav.link-to @route="components.spinners" class="nav-link">
</LinkTo>
<LinkTo @route="components.spinners" class="nav-link">
Spinners
</nav.link-to>
<nav.link-to @route="components.toasts" class="nav-link">
</LinkTo>
<LinkTo @route="components.toasts" class="nav-link">
Toasts
</nav.link-to>
<nav.link-to @route="components.tooltips" class="nav-link">
</LinkTo>
<LinkTo @route="components.tooltips" class="nav-link">
Tooltips
</nav.link-to>
</LinkTo>
</Bs::Nav>
</div>
<div class="col-10">
Expand Down
24 changes: 12 additions & 12 deletions tests/dummy/app/templates/components/navs-tabs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<div class="example">
{{! BEGIN-SNIPPET nav-example }}

<Bs::Nav @tabs={{true}} as |nav|>
<nav.link-to @route="components.navs-tabs" class="nav-link">Link 1</nav.link-to>
<nav.link-to
<Bs::Nav @tabs={{true}}>
<LinkTo @route="components.navs-tabs" class="nav-link">Link 1</LinkTo>
<LinkTo
@route="components.navs-tabs"
@query={{hash filter=2}}
class="nav-link"
>Link 2</nav.link-to>
<nav.link-to
>Link 2</LinkTo>
<LinkTo
@route="components.navs-tabs"
@query={{hash filter=3}}
class="nav-link"
>Link 3</nav.link-to>
>Link 3</LinkTo>
</Bs::Nav>

{{! END-SNIPPET }}
Expand All @@ -28,18 +28,18 @@

<h2 class="subtitle">Pills</h2>

<Bs::Nav @pills={{true}} as |nav|>
<nav.link-to @route="components.navs-tabs" class="nav-link">Link 1</nav.link-to>
<nav.link-to
<Bs::Nav @pills={{true}}>
<LinkTo @route="components.navs-tabs" class="nav-link">Link 1</LinkTo>
<LinkTo
@route="components.navs-tabs"
@query={{hash filter=2}}
class="nav-link"
>Link 2</nav.link-to>
<nav.link-to
>Link 2</LinkTo>
<LinkTo
@route="components.navs-tabs"
@query={{hash filter=3}}
class="nav-link"
>Link 3</nav.link-to>
>Link 3</LinkTo>
</Bs::Nav>

<h2 class="subtitle">JavaScript behavior</h2>
Expand Down

0 comments on commit 9a92751

Please sign in to comment.