Callouts are effective tools for capturing a user's attention. They can be utilized to convey important information, warnings, or simply to engage the user's interest.
I use callouts in my blog post to highlight key points.
Default
Warning
Danger
Above we see the cn function being used to merge default styles with the styles passed as props. Allowing for easy overriding of styles.
Questions that arose when implementing this component:
Why is the '...props' necessary?
The '...props' is necessary to pass any additional props to the component. This is useful if you want to add additional styling to the component.
It allows for any additional props to be passed to the component, in a way future-proofing the component.
Inspired by airbnb, I used this pattern when developing the memory mapper project. Each card represents a memory location and contains a carousel of photos associated with that memory location. I am going to use shadcn/ui for the carousel and the card.