Skip to content

Commit

Permalink
fix(kmodal): using icon as button
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Rudloff <philipp.rudloff@konghq.com>
  • Loading branch information
Philipp Rudloff committed Apr 5, 2024
1 parent 984227a commit 1b26615
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/components/KModal/KModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@
{{ title }}
</slot>
</div>
<CloseIcon
<button
v-if="!hideCloseIcon"
aria-label="Close"
class="close-icon"
:color="KUI_COLOR_TEXT_NEUTRAL"
data-testid="modal-close-icon"
role="button"
tabindex="0"
title="Close"
type="button"
@click="$emit('cancel')"
@keydown.enter="$emit('cancel')"
@keydown.space.prevent="$emit('cancel')"
/>
>
<CloseIcon :color="KUI_COLOR_TEXT_NEUTRAL" />
</button>
</div>
<div
class="modal-content"
Expand Down Expand Up @@ -371,7 +369,6 @@ onBeforeUnmount(async () => {
.close-icon {
border-radius: var(--kui-border-radius-20, $kui-border-radius-20);
cursor: pointer;
margin-left: auto;
margin-top: var(--kui-space-10, $kui-space-10);
outline: none;
Expand Down

0 comments on commit 1b26615

Please sign in to comment.