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

Add default styles for Modal.Content #576

Open
krzysztofzuraw opened this issue Sep 15, 2023 · 2 comments
Open

Add default styles for Modal.Content #576

krzysztofzuraw opened this issue Sep 15, 2023 · 2 comments
Labels

Comments

@krzysztofzuraw
Copy link
Member

What I'm trying to achieve

Currently if developer wants to use Modal.Content component they need to add their own styling in order to use it.

Describe a proposed solution

Add default styling for Modal.Content that allow overriding defaults if needed.
Proposed properties to add to Modal.Content:

__left="50%"
__maxWidth="400px"
__top="50%"
__transform="translate(-50%, -50%)"
backgroundColor="surfaceNeutralPlain"
boxShadow="modal"
position="fixed"

After this change API for Modal.Content will change from:

<Modal.Content>
  <Box
    __left="50%"
    __maxWidth="400px"
    __top="50%"
    __transform="translate(-50%, -50%)"
    backgroundColor="surfaceNeutralPlain"
    boxShadow="modal"
    position="fixed"
  >
    Modal content!
  </Box>
</Modal.Content>

to

<Modal.Content __width="600px">Modal content!</Modal.Content>
@krzysztofzuraw krzysztofzuraw added the next Next version of Macaw UI label Sep 15, 2023
@lkostrowski
Copy link
Member

I think its fine. We should document in storybook sizing, we can also propose patterns (large = 800, medium = 600 etc). Later we can consider a variant API for sizing.

Copy link
Contributor

github-actions bot commented Dec 1, 2023

This issue is stale because it has been open 14 days with no activity.

@github-actions github-actions bot added the stale label Dec 1, 2023
@krzysztofzuraw krzysztofzuraw added backlog and removed next Next version of Macaw UI stale labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants