-
Notifications
You must be signed in to change notification settings - Fork 3
Remove duplicate close button from OnboardingWalkthrough dialog #988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,6 @@ import { | |
| Star, | ||
| LayoutDashboard, | ||
| ArrowRight, | ||
| X, | ||
| } from 'lucide-react'; | ||
|
|
||
| const STORAGE_KEY = 'objectui-onboarding-dismissed'; | ||
|
|
@@ -102,16 +101,10 @@ export function OnboardingWalkthrough() { | |
| <Dialog open={open} onOpenChange={(v: any) => { if (!v) dismiss(); }}> | ||
| <DialogContent className="sm:max-w-md"> | ||
| <DialogHeader> | ||
| <div className="flex items-center justify-between"> | ||
| <DialogTitle className="flex items-center gap-2"> | ||
| <Rocket className="h-5 w-5 text-primary" /> | ||
| Welcome to ObjectUI | ||
| </DialogTitle> | ||
| <Button variant="ghost" size="icon" className="h-6 w-6" onClick={dismiss}> | ||
| <X className="h-4 w-4" /> | ||
| <span className="sr-only">Close</span> | ||
| </Button> | ||
| </div> | ||
| <DialogTitle className="flex items-center gap-2"> | ||
| <Rocket className="h-5 w-5 text-primary" /> | ||
| Welcome to ObjectUI | ||
| </DialogTitle> | ||
|
Comment on lines
+104
to
+107
|
||
| <DialogDescription> | ||
| Let's get you started with a quick tour. | ||
| </DialogDescription> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onOpenChangeis typed as(v: any)even though Radix Dialog passes a boolean. Now that dismissal relies on this callback, it would be better to type this parameter asboolean(and optionally update state fromv) to keep type-safety and avoid masking mistakes.