This repository was archived by the owner on Jun 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +62
-9
lines changed
Expand file tree Collapse file tree 4 files changed +62
-9
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ const data = () => ({
120120 type: ' checkbox' ,
121121 label: ' Disabled' ,
122122 name: ' disabled' ,
123- inline : false ,
123+ value : true ,
124124 disabled: true ,
125125 customClass: ' col-12' ,
126126 }),
Original file line number Diff line number Diff line change 11<template >
22 <div class =" input-checkbox" >
33 <input
4- class =" input-checkbox__toggle "
4+ class =" input-checkbox__input "
55 type =" checkbox"
66 :id =" formControl.name"
77 v-model =" formControl.value"
Original file line number Diff line number Diff line change 11<template >
2- <div class =" input-radio" >
2+ <div
3+ class =" input-radio"
4+ :class =" { 'input-radio--inline': formControl.inline }"
5+ >
36 <div
4- class =" form-check"
5- :class =" { 'form-check--inline': formControl.inline }"
7+ class =" input-radio__base"
68 v-for =" opt in formControl.options"
79 :key =" opt.name"
810 >
911 <input
10- class =" form-check__input "
12+ class =" input-radio__input "
1113 type =" radio"
1214 :id =" opt.value"
1315 v-model =" formControl.value"
1416 :value =" opt.value"
1517 :disabled =" opt.disabled"
1618 />
17- <label class =" form-check__label " :for =" opt.value" >
19+ <label class =" input-radio__label " :for =" opt.value" >
1820 {{ opt.text }}
1921 </label >
2022 </div >
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ select.form-control ~ .form-label,
158158 line-height : 1.5 ;
159159
160160 & :hover {
161- #{$checkbox } __ toggle {
161+ #{$checkbox } __ input {
162162 opacity : 0.04 ;
163163
164164 & :hover {
@@ -167,7 +167,7 @@ select.form-control ~ .form-label,
167167 }
168168 }
169169
170- & __toggle {
170+ & __input {
171171 appearance : none ;
172172 -moz-appearance : none ;
173173 -webkit-appearance : none ;
@@ -284,3 +284,54 @@ select.form-control ~ .form-label,
284284 }
285285 }
286286}
287+
288+ .input-radio {
289+ & --inline {
290+ display : inline-block ;
291+ }
292+
293+ input [type = ' radio' ] {
294+ display : none ;
295+
296+ & :checked + label :before {
297+ border-color : $theme-color ;
298+ animation : ripple 0.2s linear forwards ;
299+ }
300+ & :checked + label :after {
301+ transform : scale (1 );
302+ }
303+ }
304+
305+ label {
306+ display : inline-block ;
307+ min-height : 20px ;
308+ position : relative ;
309+ padding : 0 (20px + 10px );
310+ margin-bottom : 0 ;
311+ cursor : pointer ;
312+ vertical-align : bottom ;
313+ & :before ,
314+ & :after {
315+ position : absolute ;
316+ content : ' ' ;
317+ border-radius : 50% ;
318+ transition : all 0.3s ease ;
319+ transition-property : transform , border-color ;
320+ }
321+ & :before {
322+ left : 0 ;
323+ top : 0 ;
324+ width : 20px ;
325+ height : 20px ;
326+ border : 2px solid $base-color ;
327+ }
328+ & :after {
329+ top : 20px / 2 - 10px / 2 ;
330+ left : 20px / 2 - 10px / 2 ;
331+ width : 10px ;
332+ height : 10px ;
333+ transform : scale (0 );
334+ background : $theme-color ;
335+ }
336+ }
337+ }
You can’t perform that action at this time.
0 commit comments