Skip to content

Commit

Permalink
CC-5556: list-item - pass models/model through to HDS::Interactive (#51)
Browse files Browse the repository at this point in the history
* Pass models/model throught to HDS::Interactive

* Add to ServiceListItem and ServiceInstanceListItem
  • Loading branch information
WenInCode committed Aug 28, 2023
1 parent 63f6893 commit 93f689e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/healthy-lamps-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hashicorp/consul-ui-toolkit': patch
---

Pass through models, model on list-item to the HDS::Interactive component
2 changes: 2 additions & 0 deletions toolkit/src/components/cut/list-item/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
@isHrefExternal={{@isHrefExternal}}
@query={{@query}}
@replace={{@replace}}
@model={{@model}}
@models={{@models}}
{{on 'click' this.onClickAction}}
...attributes
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
@href={{@href}}
@isRouteExternal={{@isRouteExternal}}
@route={{@route}}
@model={{@model}}
@models={{@models}}
@isHrefExternal={{@isHrefExternal}}
@query={{@query}}
@replace={{@replace}}
Expand Down
2 changes: 2 additions & 0 deletions toolkit/src/components/cut/list-item/service/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
@href={{@href}}
@isRouteExternal={{@isRouteExternal}}
@route={{@route}}
@model={{@model}}
@models={{@models}}
@isHrefExternal={{@isHrefExternal}}
@query={{@query}}
@replace={{@replace}}
Expand Down
6 changes: 6 additions & 0 deletions toolkit/src/components/cut/list-item/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export interface ListItemSignature {
isRouteExternal?: boolean;
query?: object;
replace?: string;
model?: string | unknown;
models?: string[] | unknown[];
onClick(): void;
};
}
Expand All @@ -23,6 +25,8 @@ export interface ServiceInstanceListItemSignature {
isRouteExternal?: boolean;
query?: object;
replace?: string;
model?: string | unknown;
models?: string[] | unknown[];
onClick(): void;

// Service args
Expand All @@ -39,6 +43,8 @@ export interface ServiceListItemSignature {
isRouteExternal?: boolean;
query?: object;
replace?: string;
model?: string | unknown;
models?: string[] | unknown[];
onClick(): void;

// Service args
Expand Down

1 comment on commit 93f689e

@vercel
Copy link

@vercel vercel bot commented on 93f689e Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.