mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
31 lines
828 B
TypeScript
31 lines
828 B
TypeScript
const App = `import {Popover, PopoverTrigger, PopoverContent, Button} from "@nextui-org/react";
|
|
|
|
export default function App() {
|
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
|
|
return (
|
|
<div className="flex flex-col gap-2">
|
|
<Popover onOpenChange={(open) => setIsOpen(open)}>
|
|
<PopoverTrigger>
|
|
<Button>Open Popover</Button>
|
|
</PopoverTrigger>
|
|
<PopoverContent>
|
|
<div className="px-1 py-2">
|
|
<div className="text-sm font-bold">Popover Content</div>
|
|
<div className="text-xs">This is a content of the popover</div>
|
|
</div>
|
|
</PopoverContent>
|
|
</Popover>
|
|
<p className="text-sm text-default-400">Open: {isOpen ? "true" : "false"}</p>
|
|
</div>
|
|
);
|
|
}`;
|
|
|
|
const react = {
|
|
"/App.jsx": App,
|
|
};
|
|
|
|
export default {
|
|
...react,
|
|
};
|