mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore: fixing the toasts on blog page (#4916)
This commit is contained in:
parent
0250ced3d7
commit
4f1f5370a9
@ -114,9 +114,12 @@ function Example() {
|
||||
}
|
||||
```
|
||||
|
||||
<Spacer y={2} />
|
||||
|
||||
<CodeDemo
|
||||
title="Simple Usage"
|
||||
files={simpleToast}
|
||||
showEditor={false}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
@ -1,18 +1,21 @@
|
||||
import {addToast, Button} from "@heroui/react";
|
||||
import {addToast, Button, ToastProvider} from "@heroui/react";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Button
|
||||
onPress={() => {
|
||||
addToast({
|
||||
title: "Success",
|
||||
description: "Your changes have been saved successfully.",
|
||||
});
|
||||
}}
|
||||
>
|
||||
Show Toast
|
||||
</Button>
|
||||
</div>
|
||||
<>
|
||||
<ToastProvider />
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Button
|
||||
onPress={() => {
|
||||
addToast({
|
||||
title: "Success",
|
||||
description: "Your changes have been saved successfully.",
|
||||
});
|
||||
}}
|
||||
>
|
||||
Show Toast
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user