Skip to content

Commit a992fe9

Browse files
committed
feat: style size add and remove buttons
1 parent bfb23e2 commit a992fe9

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

frontend/src/components/Settings.vue

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@
5353

5454
<div
5555
class="border-2 border-gray-700 flex flex-wrap my-4 p-4 rounded-md w-full">
56-
<h2 class="mb-3 text-gray-200 text-xl w-full">Resizing</h2>
57-
<button @click="addSize">Add Size</button>
56+
<h2 class="text-gray-200 text-xl">Resizing</h2>
57+
<button
58+
class="border-0 focus:outline-none hover:green hover:text-green ml-8 ta-slow"
59+
@click="addSize">Add Size +
60+
</button>
5861
<div v-for="(s, i) in config.sizes" :key="i"
5962
class="flex flex-wrap items-center my-2 px-4 text-gray-100 w-full">
6063
<label :for="`width-${i}`">Width</label>
@@ -65,7 +68,17 @@
6568
<input type="text" :id="`height-${i}`" v-model.number="s.height"
6669
@input="handleNumber" @blur="setConfig"
6770
class="bg-gray-900 cursor-pointer focus:outline-none hover:text-green mx-4 px-4 py-2 rounded-md ta-color-slow">
68-
<button @click="removeSize(i)">Remove</button>
71+
<button @click="removeSize(i)">
72+
<svg version="1.1" id="x" xmlns="http://www.w3.org/2000/svg"
73+
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
74+
viewBox="0 0 11.9 11.9"
75+
style="enable-background:new 0 0 11.9 11.9;"
76+
width="10" height="10"
77+
xml:space="preserve">
78+
<path fill="#b3b3b3"
79+
d="M10.4,0L6,4.5L1.5,0L0,1.5L4.5,6L0,10.4l1.5,1.5L6,7.5l4.5,4.5l1.5-1.5L7.5,6l4.5-4.5L10.4,0z"/>
80+
</svg>
81+
</button>
6982
</div>
7083
</div>
7184

@@ -298,6 +311,14 @@ input:focus {
298311
color: #27ffa7;
299312
}
300313
314+
button > svg > path {
315+
transition: fill .6s cubic-bezier(.07, .95, 0, 1);
316+
}
317+
318+
button:hover > svg > path {
319+
fill: #27ffa7;
320+
}
321+
301322
.check-wrapper {
302323
border: 2px solid transparent;
303324
cursor: pointer;

0 commit comments

Comments
 (0)