interactive lists & non-interactive lists
This commit is contained in:
parent
23a8bee053
commit
01f6f89c7d
@ -411,6 +411,10 @@ nav {
|
||||
--__horizontal-gap: 0.75em;
|
||||
--__vertical-gap: 0.5em;
|
||||
|
||||
&.-non-interactive {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
&.-active,
|
||||
&:hover {
|
||||
border-top-width: 1px;
|
||||
|
@ -7,7 +7,7 @@
|
||||
v-for="item in items"
|
||||
:key="getKey(item)"
|
||||
class="list-item"
|
||||
:class="getClass(item)"
|
||||
:class="[getClass(item), nonInteractive ? '-non-interactive' : '']"
|
||||
role="listitem"
|
||||
>
|
||||
<slot
|
||||
@ -38,6 +38,10 @@ export default {
|
||||
getClass: {
|
||||
type: Function,
|
||||
default: item => ''
|
||||
},
|
||||
nonInteractive: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ export default {
|
||||
selector: '.list-item',
|
||||
states: {
|
||||
active: '.-active',
|
||||
hover: ':hover'
|
||||
hover: ':hover:not(.-non-interactive)'
|
||||
},
|
||||
validInnerComponents: [
|
||||
'Text',
|
||||
|
@ -29,11 +29,13 @@
|
||||
<div
|
||||
class="selectable-list-item-inner"
|
||||
:class="{ 'selectable-list-item-selected-inner': isSelected(item) }"
|
||||
@click.stop="toggle(!isSelected(item), item)"
|
||||
>
|
||||
<div class="selectable-list-checkbox-wrapper">
|
||||
<Checkbox
|
||||
:model-value="isSelected(item)"
|
||||
@update:model-value="checked => toggle(checked, item)"
|
||||
@click.stop
|
||||
/>
|
||||
</div>
|
||||
<slot
|
||||
|
@ -75,7 +75,7 @@
|
||||
:label="$t('user_card.followees')"
|
||||
:disabled="!user.friends_count"
|
||||
>
|
||||
<FriendList :user-id="userId">
|
||||
<FriendList :user-id="userId" :non-interactive="true">
|
||||
<template #item="{item}">
|
||||
<FollowCard :user="item" />
|
||||
</template>
|
||||
@ -87,7 +87,7 @@
|
||||
:label="$t('user_card.followers')"
|
||||
:disabled="!user.followers_count"
|
||||
>
|
||||
<FollowerList :user-id="userId">
|
||||
<FollowerList :user-id="userId" :non-interactive="true">
|
||||
<template #item="{item}">
|
||||
<FollowCard
|
||||
:user="item"
|
||||
|
Loading…
Reference in New Issue
Block a user