aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-04-03 23:45:45 -0400
committertaehoon <th.dev91@gmail.com>2019-04-17 11:32:49 -0400
commitd806038ad3e78314610e1d0b496c19e0ccb40a0f (patch)
treef3afa44035823c311f37d7f924bccd35cbe2909d /src
parent80d83b46d91d812bc6edf4085906c1b01b0cac46 (diff)
add border-bottom style to the list component as well
Diffstat (limited to 'src')
-rw-r--r--src/components/list/list.vue17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/components/list/list.vue b/src/components/list/list.vue
index f361e3b1..d8c9f5a3 100644
--- a/src/components/list/list.vue
+++ b/src/components/list/list.vue
@@ -1,6 +1,8 @@
<template>
<div class="list">
- <slot name="item" v-for="item in items" :item="item" />
+ <div v-for="item in items" class="list-item" :key="getKey(item)">
+ <slot name="item" :item="item" />
+ </div>
<div class="list-empty-content faint" v-if="items.length === 0">
<slot name="empty" />
</div>
@@ -13,13 +15,26 @@ export default {
items: {
type: Array,
default: () => []
+ },
+ getKey: {
+ type: Function,
+ default: item => item
}
}
}
</script>
<style lang="scss">
+@import '../../_variables.scss';
+
.list {
+ &-item {
+ display: flex;
+ border-bottom: 1px solid;
+ border-bottom-color: $fallback--border;
+ border-bottom-color: var(--border, $fallback--border);
+ }
+
&-empty-content {
text-align: center;
padding: 10px;