Skip to content
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

[bug]: Dialog / AlertDialog not styled properly #5357

Open
2 tasks done
bennaaym opened this issue Oct 13, 2024 · 4 comments
Open
2 tasks done

[bug]: Dialog / AlertDialog not styled properly #5357

bennaaym opened this issue Oct 13, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@bennaaym
Copy link

Describe the bug

Description:
I am encountering an issue with the styling of Dialog and AlertDialog components in my project. Despite following the documentation, the components do not render as expected, and the styling appears to be broken or missing. I am unsure of the root cause and have tried to troubleshoot without success.

import { Button } from "@/lib/shadcn/ui/button";
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/lib/shadcn/ui/dialog";

export const AlertDialog = () => {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="outline">Edit Profile</Button>
      </DialogTrigger>
      <DialogContent className="sm:max-w-[425px]">
        <DialogHeader>
          <DialogTitle>Edit profile</DialogTitle>
          <DialogDescription>
            Make changes to your profile here. Click save when you're done.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter>
          <Button type="submit">Save changes</Button>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  );
};

image

Expected Behavior:
Dialog and AlertDialog should render with the proper styling as documented.

Actual Behavior:
The styling for Dialog and AlertDialog is either missing or broken. The components render with incorrect or no styles applied.

Affected component/components

Dialog, AlertDialog

How to reproduce

Steps to Reproduce:

  1. Install ShadCN components as per the documentation.
  2. Import and use Dialog or AlertDialog in a project.
  3. Observe that the components do not have the correct or expected styling.

Codesandbox/StackBlitz link

https://ui.shadcn.com/docs/components/dialog

Logs

No response

System Info

**Environment:**
- **Framework:** [email protected]
- **Browser:** Chrome / Brave
- **OS:** Windows
- **Node.js version:** 20.14.0

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@bennaaym bennaaym added the bug Something isn't working label Oct 13, 2024
@Gurvinder-Singh02
Copy link

can you assign me this issue would love to resolve it

@bennaaym
Copy link
Author

@Gurvinder-Singh02 Do you have an idea about what is causing such behavior?

@danielvanc
Copy link

Am hoping to use this Component asap, so would be good to know what's causing this bug.

@Gurvinder-Singh02
Copy link

Yeah i think it would be issue in tailwind.config but will figure out the root cause if you assign it to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants