Created
January 30, 2024 08:44
-
-
Save liamgriffin/3042de6783250fe8c06596d5e68c792e to your computer and use it in GitHub Desktop.
Color Swatches Visual Component
This file contains hidden or 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
<span | |
{% if swatch_value %} | |
class="swatch{% if shape == 'square' %} swatch--square{% endif %}" | |
style="--swatch--background: {{ swatch_value }}" | |
{% else %} | |
class="swatch swatch--unavailable{% if shape == 'square' %} swatch--square{% endif %}" | |
{% endif %} | |
></span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment