In this lesson, we'd like to highlight that this listing is new. To do this we'll need to build a badge that will do just that.
The badge will be an inline element with the text right above the title as a span. We'll see how to color, position, and size it with Tailwind utility classes.
Some classes we will use:
inline-block
for correct padding behavior in the spanbg-teal-200
and text-teal-800
to adjust coloruppercase
font-semibold
tracking-wide
to adjust the look of the badge textflex
anditems-baseline
to adjust the positioningHi,
Even though you probably won't come back to this lesson to check the comment, I would like to point out, that setting a ml-2
on the container that wrapping the number of beds and baths, produce some side effect because whenever there no "new" badge, the text will be offset by 2*based rem right? So in this case would it be better to add the margin on the badge itself with mr-2
?