Skip to content

feat: modal component#1

Open
rjfuhrman42 wants to merge 3 commits intomainfrom
reid/modal-component
Open

feat: modal component#1
rjfuhrman42 wants to merge 3 commits intomainfrom
reid/modal-component

Conversation

@rjfuhrman42
Copy link
Collaborator

@rjfuhrman42 rjfuhrman42 commented Jan 15, 2025

Description

In this PR I've created a simple Modal component that wraps a DaisyUI modal component. This is basically pulled straight from the example code that makes use of the HTML Dialog box element.

The Modal component has the following props:

  • title - the title of the modal
  • body - the body paragraph
  • children - which will represent the slots, basically just takes a nested react element and displays it on the bottom half of the modal
  • slotAlignment - gives three options for aligning the slot components: justify-start(left), justify-center, justify-end (right)

I also setup some initial file structure for components and icons. components is a separate folder in the src directory and icons is a subfolder in the components directory that contains svg icons converted into React SVG's. We don't have to follow this convention, its just the one I'm used to 😄

Screenshot(s)

Screenshot 2025-01-15 at 10 43 19 AM Screenshot 2025-01-15 at 10 43 10 AM

@rjfuhrman42 rjfuhrman42 marked this pull request as ready for review January 15, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant