Skip to content

Commit a4f8700

Browse files
authored
Merge pull request #497 from seamapi/update-loading-toast-text
Add `label` to `LoadingToast`
2 parents ddde588 + 1dc9a3b commit a4f8700

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/lib/ui/LoadingToast/LoadingToast.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const Content: Story = {
4545
}}
4646
>
4747
<Box height={32}>
48-
<LoadingToast isLoading={props.isLoading} />
48+
<LoadingToast isLoading={props.isLoading} label='Loading devices' />
4949
</Box>
5050

5151
<Button size='small' onClick={rerender}>

src/lib/ui/LoadingToast/LoadingToast.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ import { Spinner } from 'lib/ui/Spinner/Spinner.js'
66

77
interface LoadingToastProps {
88
isLoading: boolean
9+
label: string
910
top?: number
1011
left?: number
1112
}
1213

1314
export function LoadingToast({
1415
isLoading = true,
16+
label,
1517
top,
1618
left,
1719
}: LoadingToastProps): JSX.Element {
@@ -45,7 +47,7 @@ export function LoadingToast({
4547
<div className='seam-loading-toast-icon-wrap'>
4648
{isLoading ? <Spinner size='small' /> : <CheckBlackIcon />}
4749
</div>
48-
<p className='seam-loading-toast-text'>Loading devices</p>
50+
<p className='seam-loading-toast-text'>{label}</p>
4951
</div>
5052
)
5153
}

0 commit comments

Comments
 (0)