From 3a318dc373dba930573d542f4910772bf6fdc502 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Wed, 3 Apr 2019 23:35:43 -0400
Subject: add some styling to the selectable-list component

---
 src/components/selectable_list/selectable_list.vue | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

(limited to 'src/components/selectable_list/selectable_list.vue')

diff --git a/src/components/selectable_list/selectable_list.vue b/src/components/selectable_list/selectable_list.vue
index f0ab33dd..7a7a7644 100644
--- a/src/components/selectable_list/selectable_list.vue
+++ b/src/components/selectable_list/selectable_list.vue
@@ -1,7 +1,9 @@
 <template>
   <div class="selectable-list">
-    <div v-for="item in items" :key="getKey(item)">
-      <Checkbox :checked="isChecked(item)" @change="checked => toggle(checked, item)" />
+    <div v-for="item in items" :key="getKey(item)" class="selectable-list-item" :class="{ 'selectable-list-item-selected': isSelected(item) }">
+      <div class="selectable-list-checkbox-wrapper">
+        <Checkbox :checked="isSelected(item)" @change="checked => toggle(checked, item)" />
+      </div>
       <slot name="item" :item="item" />
     </div>
     <div class="selectable-list-empty-content faint" v-if="items.length === 0">
@@ -13,7 +15,23 @@
 <script src="./selectable_list.js"></script>
 
 <style lang="scss">
+@import '../../_variables.scss';
+
 .selectable-list {
+  &-item {
+    display: flex;
+
+    &-selected {
+      background-color: $fallback--lightBg;
+      background-color: var(--lightBg, $fallback--lightBg);
+    }
+  }
+
+  &-checkbox-wrapper {
+    padding: 10px;
+    flex: none;
+  }
+
   &-empty-content {
     text-align: center;
     padding: 10px;
-- 
cgit v1.2.3-70-g09d2

