Next, let’s add size options to our button. We’re going to have four different size options, which we’ll define directly inside our base button.
lg
: Largebase
: Base (which we already have)sm
: Smallxs
: Extra small
Defining our Button Sizes
The first thing we’ll want to do is remove the current size-based classes from our base button, we’ll then use these classes to define our base size option.
As a reminder, here’s what we currently have for our base button component:
Ready to get started?
Join Adocasts+ for $8/mo or sign into your account to get access to all of our lessons.