Loading
Multi-Style Tailwind Components 23 exercises
Problem

Implement Size and Shape Variants

Now that you're comfortable with this approach of creating a styles lookup object that holds a key for each possible prop value, it's time to recreate the same process for the other two props.

Challenge

Your challenge is to repeat the same process we followed for impactClasses variant to crea

Loading exercise

Transcript

0:00 Now that you're comfortable with this approach of creating a styles lookup object that holds a key for each possible prop value, it's time to recreate the same process for the other two props. We've taken care of the impact variants. We now want to repeat the same process for the sizeProp and the shapeProp.

0:16 Down here, after creating our baseClasses and impactClasses, we're going to repeat the same process for a sizeClasses object and a shapeClasses object.

0:24 Once again, TypeScript will guide you through the process. Once you have created these objects and you add them to the class name attribute, you should have the buttons below here look exactly like the buttons at the top.