Merge all slots of BasicUserCard into one

This commit is contained in:
taehoon 2019-02-27 11:58:29 -05:00
parent 6e41b4b546
commit 0e86681aba
4 changed files with 46 additions and 65 deletions

View file

@ -7,26 +7,16 @@
<user-card-content :user="user" :switcher="false"></user-card-content>
</div>
<div class="user-card-collapsed-content" v-else>
<div class="user-card-primary-secondary-wrapper">
<div class="user-card-primary-area">
<div :title="user.name" class="user-card-user-name">
<span v-if="user.name_html" v-html="user.name_html"></span>
<span v-else>{{ user.name }}</span>
</div>
<div>
<router-link :to="userProfileLink(user)">
@{{user.screen_name}}
</router-link>
</div>
<slot name="primary-area"></slot>
</div>
<div class="user-card-secondary-area">
<slot name="secondary-area"></slot>
</div>
<div :title="user.name" class="user-card-user-name">
<span v-if="user.name_html" v-html="user.name_html"></span>
<span v-else>{{ user.name }}</span>
</div>
<div class="user-card-tertiary-area">
<slot name="tertiary-area"></slot>
<div>
<router-link :to="userProfileLink(user)">
@{{user.screen_name}}
</router-link>
</div>
<slot></slot>
</div>
</div>
</template>
@ -52,19 +42,6 @@
margin-left: 0.7em;
text-align: left;
flex: 1;
min-width: 0;
}
&-primary-secondary-wrapper {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
&-primary-area {
flex: 1;
margin-right: 1em;
min-width: 0;
}
&-user-name {
@ -76,15 +53,6 @@
}
}
&-secondary-area {
flex: none;
.btn {
margin-top: .5em;
width: 10em;
}
}
&-expanded-content {
flex: 1;
margin-left: 0.7em;
@ -106,15 +74,5 @@
margin-bottom: 0;
}
}
@media (min-width: 320px) and (max-width: 480px) {
&-primary-secondary-wrapper {
flex-direction: column;
}
&-primary-area {
margin-right: 0;
}
}
}
</style>