mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-28 00:05:25 +00:00
* wrap event handler with if statement and pass noop if disabled * add test coverage * change test name * Update ui/tests/integration/components/selectable-card-test.js Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com> --------- Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
16 lines
402 B
Handlebars
16 lines
402 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
<Hds::Card::Container
|
|
tabindex={{unless @disabled "0"}}
|
|
class="selectable-card {{if @disabled 'disabled'}}"
|
|
@level={{if @disabled "base" "mid"}}
|
|
@hasBorder={{true}}
|
|
{{on "click" (if @disabled (noop) @onClick)}}
|
|
{{on "keypress" (if @disabled (noop) @onClick)}}
|
|
...attributes
|
|
>
|
|
{{yield}}
|
|
</Hds::Card::Container> |