Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions app/interactive-examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,27 @@ function AlertExampleContent() {
setStatus("Alert dismissed.");
};

const openAlert2 = async () => {
await alert({
title: "Heads up 2",
description: "This is an interactive alert demo 2.",
buttonLabel: "Alright",
dismissButtonVariant: "outline",
dismissButtonClassName: "min-w-32",
});
setStatus("Alert 2 dismissed.");
};

return (
<div className="space-y-2">
<Button type="button" onClick={() => void openAlert()}>
Open Alert
</Button>
<div className="flex flex-row gap-2">
<Button type="button" onClick={() => void openAlert()}>
Open Alert
</Button>
<Button type="button" onClick={() => void openAlert2()}>
Open Alert 2
</Button>
</div>
<p className="text-xs text-muted-foreground">{status}</p>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"@types/node": "^25.3.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"eslint": "^10.0.1",
"eslint": "^9.39.0",
"eslint-config-next": "^16.1.6",
"eslint-plugin-react": "^7.37.5",
"postcss": "^8.5.6",
"shadcn": "^3.8.5",
Expand Down
Loading