mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
26 lines
639 B
JavaScript
26 lines
639 B
JavaScript
import {addToast, Button} from "@heroui/react";
|
|
import React from "react";
|
|
|
|
export default function App() {
|
|
return (
|
|
<div className="flex flex-wrap gap-2">
|
|
{["top-left", "top-center", "top-right", "bottom-left", "bottom-center", "bottom-right"].map(
|
|
(position) => (
|
|
<Button
|
|
key={position}
|
|
variant={"flat"}
|
|
onPress={() => {
|
|
addToast({
|
|
title: "Toast title",
|
|
description: "Toast displayed successfully",
|
|
});
|
|
}}
|
|
>
|
|
{position}
|
|
</Button>
|
|
),
|
|
)}
|
|
</div>
|
|
);
|
|
}
|