Skip to content

Instantly share code, notes, and snippets.

@lokmanm
Last active December 22, 2021 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lokmanm/9e954db83135512ee2233022510a330b to your computer and use it in GitHub Desktop.
Save lokmanm/9e954db83135512ee2233022510a330b to your computer and use it in GitHub Desktop.
Reusable Antlers component
---
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