Skip to content

Commit

Permalink
Merge branch 'main' into kh-fix-10031
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 authored Jan 17, 2025
2 parents 03afcb2 + fb0113d commit ee7db2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/react/src/Banner/Banner.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
},
{
"id": "experimental-components-banner-features--custom-icon"
},
{
"id": "experimental-components-banner-examples--with-announcement"
}
],
"props": [
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Banner/Banner.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const WithUserAction = () => {
)
}

export const WithDynamicContent = () => {
export const WithAnnouncement = () => {
type Choice = 'one' | 'two' | 'three'
const messages: Map<Choice, string> = new Map([
['one', 'This is a message for choice one'],
Expand Down
8 changes: 6 additions & 2 deletions packages/react/src/Button/Button.examples.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {Meta} from '@storybook/react'
import {Button} from '.'
import {DownloadIcon} from '@primer/octicons-react'
import {Banner} from '../experimental'
import {AriaStatus} from '../live-region'
import {AriaStatus, AriaAlert} from '../live-region'

const meta: Meta<typeof Button> = {
title: 'Components/Button/Examples',
Expand Down Expand Up @@ -69,7 +69,11 @@ export const LoadingStatusAnnouncementError = () => {

return (
<>
{!loading && error ? <Banner title="Export failed" variant="critical" /> : null}
{!loading && error ? (
<AriaAlert>
<Banner title="Export failed" variant="critical" />
</AriaAlert>
) : null}

<Button loading={loading} leadingVisual={DownloadIcon} onClick={onClick('error')}>
Export (error)
Expand Down

0 comments on commit ee7db2a

Please sign in to comment.