This is a big cleanup release from a usability standpoint. We’re excited to announce that styling can finally be customized.
What’s Changed
- Feature/update example packages by @thinkjrs in Feature/update example packages by thinkjrs · Pull Request #34 · Tincre/promo-button · GitHub
- Add Tailwindcss Classes by @thinkjrs in Add Tailwindcss Classes by thinkjrs · Pull Request #39 · Tincre/promo-button · GitHub
- add how-to on customizing button css by @thinkjrs in 📓 add how-to on customizing button css by thinkjrs · Pull Request #40 · Tincre/promo-button · GitHub
Customizable CSS
Customizable class name for the outer button container, i.e. add your own button class via the jsx shape
prop within your component declaration. For example,
<PromoButton
logoSrc=""
words={['Real', 'Easy', 'Ads']}
shape="my-custom-outer-button-class"
email="jason@tincre.com"
backend="my-backend-route"
/>
Use it in your global css file:
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.promo-button-my-custom-outer-button-class {
@apply px-36 py-2 // whatever tailwind you want
}
}
-
See additional classes available to customize in the
tailwind.config.js
file. -
Custom color
brand
which can be modified in clients’ tailwind configuration files, i.e.
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
brand: '#4F46E5',
},
},
},
Full Changelog: Comparing 0.1.3...0.1.4 · Tincre/promo-button · GitHub