Make ListItem component more accessible by using a button tag when clickable (#1044) (#1046)

Co-authored-by: eleith <online-github@eleith.com>
This commit is contained in:
eleith 2022-07-25 06:08:35 -07:00 committed by GitHub
parent 5e1aa4019a
commit 723d599c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
<template>
<div
<component
:is="clickable ? 'button' : 'div'"
class="
w-full
flex
@ -14,7 +15,7 @@
:class="{ 'cursor-pointer hover:shadow-md hover:bg-gray-200 dark:hover:bg-dark-gray-800': clickable }"
>
<slot />
</div>
</component>
</template>
<script lang="ts">