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

Co-authored-by: eleith <eleith@lemon.localdomain>
This commit is contained in:
eleith 2022-07-24 19:18:50 -07:00 committed by GitHub
parent 19dfc331f4
commit b9e1de33c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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