Skip to content

Conversation

@JayGeorge
Copy link
Contributor

@JayGeorge JayGeorge commented Jan 19, 2026

Description of the Problem

Currently, there's no alert component

What this PR Does

2026-01-19 at 16 29 49@2x

  • Adds an alert component
  • The alert component can be inline or a more detailed message
  • There are 4 variations
    • Default
    • Success
    • Error
    • Warning
  • Each variation defaults to a default icon but the user can also set a custom icon
  • The alert can also be used with heading/description components. This is documented and demo'd.

How to Reproduce

  1. It's easiest to check out cp/playground, where you'll find various alert demos, shown in the screenshot above.
  2. Alternatively, you can check out the commit Dashboard demo and go to cp/dashboard to see the component in situ.
@JayGeorge JayGeorge marked this pull request as draft January 21, 2026 15:56
@JayGeorge JayGeorge marked this pull request as ready for review January 21, 2026 17:18
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a heading prop. I thought that would be pretty useful so you dont need to start importing Heading and Description components manually.

I also made it so when you use the text prop, it'll put it into a Description component for consistency.

However I noticed it ends up with slightly different colors than when using just the span. Check it out. Here I've got both a Description and then the span just to illustrate it:

<Description :text="text" />
+<span v-html="text" />
CleanShot 2026-01-21 at 14 48 25

Also, it messes with the padding/spacing:

<Alert text="This is a default alert message" />
<Alert><Description>This is a default alert message</Description></Alert>
CleanShot 2026-01-21 at 14 51 08
@JayGeorge JayGeorge requested a review from jasonvarga January 22, 2026 10:29
@JayGeorge
Copy link
Contributor Author

I added a heading prop. I thought that would be pretty useful so you dont need to start importing Heading and Description components manually.

Good idea!

However I noticed it ends up with slightly different colors than when using just the span.

Fixed :)

Also, it messes with the padding/spacing:

<Alert text="This is a default alert message" />
<Alert><Description>This is a default alert message</Description></Alert>

I can't see this. Did you hard refresh the page after changing things? This is one of those instances where Vite doesn't seem to inject the changes unless you refresh

@jasonvarga jasonvarga merged commit 6d19857 into master Jan 22, 2026
11 checks passed
@jasonvarga jasonvarga deleted the alert-component branch January 22, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants