chore: fixing the toasts on blog page (#4916)

This commit is contained in:
Maharshi Alpesh 2025-02-24 21:53:38 +05:30 committed by GitHub
parent 0250ced3d7
commit 4f1f5370a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 13 deletions

View File

@ -114,9 +114,12 @@ function Example() {
} }
``` ```
<Spacer y={2} />
<CodeDemo <CodeDemo
title="Simple Usage" title="Simple Usage"
files={simpleToast} files={simpleToast}
showEditor={false}
/> />

View File

@ -1,18 +1,21 @@
import {addToast, Button} from "@heroui/react"; import {addToast, Button, ToastProvider} from "@heroui/react";
export default function App() { export default function App() {
return ( return (
<div className="flex flex-wrap gap-2"> <>
<Button <ToastProvider />
onPress={() => { <div className="flex flex-wrap gap-2">
addToast({ <Button
title: "Success", onPress={() => {
description: "Your changes have been saved successfully.", addToast({
}); title: "Success",
}} description: "Your changes have been saved successfully.",
> });
Show Toast }}
</Button> >
</div> Show Toast
</Button>
</div>
</>
); );
} }