Skip to content

Add neutral option to BccAlert#215

Merged
u12206050 merged 5 commits into
mainfrom
info-box-neutral
Sep 15, 2023
Merged

Add neutral option to BccAlert#215
u12206050 merged 5 commits into
mainfrom
info-box-neutral

Conversation

@StevenMalaihollo

@StevenMalaihollo StevenMalaihollo commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

Change summary

Also made the icon prop customizable.

Change type

  • No review
  • Small PR
  • Big PR
  • Refactor

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-215.westeurope.3.azurestaticapps.net

@laurensgroeneveld laurensgroeneveld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, just two small things I noticed.

class: "bcc-alert-danger",
icon: ErrorFillIcon,
},
notice: {

@laurensgroeneveld laurensgroeneveld Sep 13, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the Badge/Pin we've named it neutral. I see here it uses the brand colors, so could brand be an appropriate option?

I'm mostly thinking about this because the other options are "contexts", which is a specific term in the design system related to the (mostly) semantic colors. Perhaps check this naming with the designers with this in mind if it hasn't been discussed already (sorry if this was already hashed out behind the scenes 😅).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed! Renamed to neutral

type Props = {
context?: keyof typeof contexts;
icon?: boolean;
icon?: boolean | Component;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The type we use for icon in other components like the button is string | Component | Function, so it could be nice to add those other two as well to keep it similar.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm actually not sure if string works on icon haven't tested it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fair, and I think I ran into that when accidentally passing an icon as a string it would not throw an error because string is allowed (but would render <searchicon> as an HTML element), so maybe we should just remove it everywhere.

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-215.westeurope.3.azurestaticapps.net

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-215.westeurope.3.azurestaticapps.net

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-coast-028fe6203-215.westeurope.3.azurestaticapps.net

@u12206050 u12206050 merged commit 45e2a3b into main Sep 15, 2023
@u12206050 u12206050 deleted the info-box-neutral branch September 15, 2023 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants