Open btbunze opened 2 weeks ago
This looks great! I pushed a few small tweaks we talked about @btbunze.
This currently has some baked-in CSS classes: modal-background
, modal-container
, maybe more. I'm not sure we should included these, as I think we should prefer Tailwind styling versus custom classes. We should either 1) remove these or 2) think through them better for naming, and where they should be (should every element get a class, etc.)
Currently when using the component, you do this:
<Modal>
<DialogTitle>Confirm the thing</DialogTitle>
<DialogDescription>Please confirm your choice!</DialogDescription>
</Modal>
I have 2 concerns with this:
Potential solution:
Wrap headless UI components in a thin wrapper, which for now just renders the Headless UI elements. So <DialogTitle>
would get wrapped by <ModalTitle>
.
That would change the usage to look like this:
<Modal>
<ModalTitle>Confirm the thing</ModalTitle>
<ModalDescription>Please confirm your choice!</ModalDescription>
</Modal>
@jakedohm thanks for the feedback! I think both of those recommendations are solid, and I've implemented them in the latest commit, but here are my thoughts on each of them individually:
Also, I don't see the close button changes you made, but once those are committed, this should be good to merge 🎉
62