If you had to create an alert component that supports error, warning, success, and info variants, what would the component's API design look like?

Follow

@brad_frost I'm always a "keep it simple" guy... 🤷‍♂️

enum Severities { Info, Success, Warning, Error }
void Alert(Severities severity, String alertText);

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.