[BpkInfoBanner][ISO-1653] Add Critical info banner type#4317
[BpkInfoBanner][ISO-1653] Add Critical info banner type#4317
Conversation
Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/64bb988a-2672-4036-b8a2-7edde08ab8b0
|
Copilot make sure all items in the PR description checklist are checked |
|
Visit https://backpack.github.io/storybook-prs/4317 to see this build running in a browser. |
Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/cb0d30ec-1ac6-4018-9ae9-2f78d6392e21
Done in commit |
|
Visit https://backpack.github.io/storybook-prs/4317 to see this build running in a browser. |
Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/92cd6ff8-703c-47d5-b795-d363bcc2ecd5
|
Visit https://backpack.github.io/storybook-prs/4317 to see this build running in a browser. |
…nner-error-day Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/70f2b967-6499-4ae4-a062-cbdd6bc48721
Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/37594918-75a6-4d57-bf1d-39b3b53bac98
…ritical type Co-authored-by: mariia-shyn <206853533+mariia-shyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/014dac19-0112-48c7-99ea-09595cfc0b11
|
Visit https://backpack.github.io/storybook-prs/4317 to see this build running in a browser. |
| } | ||
|
|
||
| &--critical { | ||
| background-color: tokens.$bpk-private-info-banner-error-day; |
There was a problem hiding this comment.
Copilot please use $bpk-status-danger-spot-day for the background color.
There was a problem hiding this comment.
Done in commit 4b9d92d — changed the --critical background color to $bpk-status-danger-spot-day.
| <BpkInfoBannerExpandableState | ||
| message="Critical alert" | ||
| type={ALERT_TYPES.CRITICAL} | ||
| action={{title: "Sample Action", callback: () => alert('Hello from action')}} // eslint-disable-line no-alert |
There was a problem hiding this comment.
Copilot Adjust this alert to a console log, verify this is how other Storybook stories handle examples first.
There was a problem hiding this comment.
Done in commit eb53715. The file already imports action from bpk-storybook-utils (the same pattern used by other stories), so replaced () => alert('Hello from action') with action('action clicked').
Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/c96500ff-487c-4429-b9f9-048a4f9f12a5
Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com> Agent-Logs-Url: https://github.com/Skyscanner/backpack/sessions/db65e187-dd6d-497d-aecd-cf8276756f0d
All checklist items are checked in the PR description. |
|
Visit https://backpack.github.io/storybook-prs/4317 to see this build running in a browser. |
Adds a new
CRITICALtype toBpkInfoBanner, including styling, examples, and stories.Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component) — N/A (existing component)README.mdSummary of changes
CriticalExpandableWithActionexample and storyCriticalDismissableBehaviourExampletoexamples.jsandstories.jsBpkInfoBanner.module.scss: overrode toggle-button fill and children-container color to white for--critical; used$bpk-status-danger-spot-dayfor the--criticalbackground colorBpkInfoBannerInner.tsx: passesalternatetoBpkLinkandonDarktoBpkCloseButtonwhen type isCRITICALexamples.js: replacedalertwith theactionutility (frombpk-storybook-utils) inCriticalExpandableWithActionExample, consistent with how other Storybook stories handle callbacks💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.