5
5
:class =" ['button-x', `theme__${props.theme}`]" >
6
6
<div class =" inner-content" >
7
7
8
+ <svg
9
+ v-if =" theme === 'primary'"
10
+ width =" 25"
11
+ height =" 41"
12
+ viewBox =" 0 0 25 41"
13
+ fill =" none"
14
+ xmlns =" http://www.w3.org/2000/svg"
15
+ class =" detail" >
16
+ <path
17
+ d =" M 24 40 H 2.0441 C 1.3963 40 0.9194 39.3934 1 38.7639 L 7.0927 13.9863 C 9 6 16 1 24 1"
18
+ fill =" #070707"
19
+ fill-opacity =" 0.2"
20
+ shape-rendering =" crispEdges" />
21
+ <path
22
+ d =" M 24 40 H 2.0441 C 1.3963 40 0.9194 39.3934 1 38.7639 L 7.0927 13.9863 C 9 6 16 1 24 1"
23
+ fill =" #FFC582"
24
+ shape-rendering =" crispEdges"
25
+ class =" fill-path" />
26
+ <path
27
+ d =" M 24 40 H 2.0441 C 1.3963 40 0.9194 39.3934 1 38.7639 L 7.0927 13.9863 C 9 6 16 1 24 1"
28
+ stroke =" #FFC582"
29
+ stroke-width =" 2"
30
+ shape-rendering =" crispEdges" />
31
+ </svg >
32
+
8
33
<div :class =" ['button-content', { hide: loading }]" >
9
34
<slot />
10
35
</div >
@@ -62,7 +87,7 @@ const props = defineProps({
62
87
& :not ([disabled = " true" ]) {
63
88
& :hover {
64
89
.button-content {
65
- transition : 150 ms ease-in ;
90
+ @include transitionDefault ;
66
91
text-decoration : none ;
67
92
}
68
93
}
@@ -97,16 +122,71 @@ const props = defineProps({
97
122
}
98
123
99
124
.button-content {
100
- transition : 150 ms ease-out ;
125
+ @include transitionDefault ;
101
126
& .hide {
102
127
opacity : 0 ;
103
128
}
104
129
}
105
130
131
+ .detail {
132
+ position : absolute ;
133
+ top : 0 ;
134
+ right : calc (100% - 1px );
135
+ .fill-path {
136
+ opacity : 0 ;
137
+ @include transitionDefault ;
138
+ }
139
+ }
140
+
106
141
// ////////////////////////////////////////////////////////////////////// Themes
107
142
.theme__primary {
143
+ display : block ;
144
+ width : fit-content ;
145
+ filter : drop-shadow (0px 2px 14px rgba (255 , 197 , 130 , 0.32 ));
146
+ padding-left : toRem (25 );
147
+ & :before {
148
+ content : ' ' ;
149
+ position : absolute ;
150
+ left : toRem (25 );
151
+ top : 0 ;
152
+ width : calc (100% - 25px );
153
+ height : 100% ;
154
+ box-sizing : border-box ;
155
+ border-top : solid 2px $chardonnay ;
156
+ border-bottom : solid 2px $chardonnay ;
157
+ border-right : solid 2px $chardonnay ;
158
+ border-top-right-radius : 2px ;
159
+ border-bottom-right-radius : 2px ;
160
+ background-color : rgba (7 , 7 , 7 , 0.2 );
161
+ @include transitionDefault ;
162
+ }
163
+ .inner-content {
164
+ position : relative ;
165
+ height : toRem (41 );
166
+ padding : toRem (10 ) toRem (17 ) toRem (10 ) toRem (3 );
167
+ }
108
168
.button-content {
169
+ display : flex ;
170
+ align-items : center ;
171
+ width : fit-content ;
109
172
@include b1 ;
173
+ :deep (div ) {
174
+ @include b1;
175
+ @include transitionDefault ;
176
+ }
177
+ }
178
+ & :hover {
179
+ .detail {
180
+ .fill-path {
181
+ opacity : 1 ;
182
+ }
183
+ }
184
+ & :before {
185
+ background-color : $chardonnay ;
186
+ }
187
+ .button-content {
188
+ color : $codGray ;
189
+ }
110
190
}
111
191
}
112
192
@@ -115,4 +195,13 @@ const props = defineProps({
115
195
@include b2 ;
116
196
}
117
197
}
198
+
199
+ .theme__icon {
200
+ padding : toRem (9 );
201
+ border-radius : 50% ;
202
+ border : 2px solid $sageGreen ;
203
+ .button-content {
204
+ display : flex ;
205
+ }
206
+ }
118
207
</style >
0 commit comments