Created
June 24, 2020 14:35
-
-
Save inxilpro/09ff3c39c9d4475cee56ef5023c24f90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ addVariant, e }) => { | |
addVariant('input-checked', ({ modifySelectors, separator }) => { | |
return modifySelectors(({ className }) => { | |
const modified = e(`input-checked${ separator }${ className }`); | |
return `input:checked + .${ modified }, input:checked + * .${ modified }`; | |
}); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="demo1" type="radio" class="sr-only" /> | |
<label for="demo1" class="border-gray-100 input-checked:border-blue-400"> | |
<div class="hidden input-checked:block"> | |
Selected | |
</div> | |
<div class="block input-checked:hidden"> | |
Not Selected | |
</div> | |
</label> | |
<input id="demo2" type="radio" class="sr-only" /> | |
<label for="demo2" class="border-gray-100 input-checked:border-blue-400"> | |
<div class="hidden input-checked:block"> | |
Selected | |
</div> | |
<div class="block input-checked:hidden"> | |
Not Selected | |
</div> | |
</label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment