Skip to content

Commit

Permalink
Allow ListItem components to link to external links
Browse files Browse the repository at this point in the history
Closes #3039

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
  • Loading branch information
tcitworld committed Aug 15, 2022
1 parent 2226dba commit e9b4dc2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/ListItem/ListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@
<listItem
:title="'Title of the element'"
:counter-number=4
href="https://nextcloud.com"
:compact="true" >
<template #icon>
<div class="icon-edit" />
</template>
<template #subtitle>
This one is with an external link
</template>
</listItem>
</ul>
```
Expand All @@ -187,7 +191,9 @@
<a :id="anchorId"
ref="list-item"
:class="{ 'list-item--active' : active }"
href="#"
:href="href"
target="_blank"
rel="noopener noreferrer"
class="list-item"
:aria-label="linkAriaLabel"
@mouseover="handleMouseover"
Expand Down Expand Up @@ -319,6 +325,14 @@ export default {
default: '',
},
/**
* The value for the external link
*/
href: {
type: String,
default: '#',
},
/**
* Id for the <a> element
*/
Expand Down

0 comments on commit e9b4dc2

Please sign in to comment.