/
SearchInput.vue
58 lines (50 loc) · 1.07 KB
/
SearchInput.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<div class="search-wrapper">
<div class="search-icon">
<i class="fas fa-search"></i>
</div>
<input
type="text"
placeholder="Search"
:value="value"
@input="$emit('input', $event.target.value)"
>
</div>
</template>
<script>
export default {
name: 'SearchInput',
props: {
value: {
type: String,
default: ''
},
},
}
</script>
<style lang="sass" scoped>
@use "~main/theme"
.search-wrapper
position: relative
.search-icon
height: 100%
display: flex
flex-direction: column
justify-content: center
position: absolute
top: 0
left: .5em
opacity: .8
input
background-color: rgb(var(--color-input-dark-bg))
border: 1px solid rgb(var(--color-input-dark-bg))
color: rgb(var(--color-text))
outline: none
padding: .2em .5em .2em 2em
width: 100%
height: 100%
&::placeholder
color: rgb(var(--color-gray-600))
&:focus
border-color: rgb(var(--color-white))
</style>