Last active
December 22, 2021 19:39
-
-
Save lokmanm/9e954db83135512ee2233022510a330b to your computer and use it in GitHub Desktop.
Reusable Antlers 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
--- | |
sizes: | |
sm: 'text-sm' | |
md: 'text-base' | |
lg: 'text-lg' | |
weights: | |
normal: 'font-normal' | |
bold: 'font-bold' | |
medium: 'font-medium' | |
types: | |
gray: 'text-gray-900' | |
white: 'text-white' | |
brand: 'text-primary-900' | |
--- | |
<p | |
class="{{ size ? view:sizes[size] : view:sizes['md'] }} {{ weight ? view:weights[weight] : view:weights['normal'] }} {{ color ? view:types[color] : view:types['gray'] }} {{ class }}"> | |
{{ label }} | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment