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

Hide PModal footer when no actions are passed #1214

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Hide PModal footer when no actions are passed #1214

merged 1 commit into from
Apr 17, 2024

Conversation

aaazzam
Copy link
Collaborator

@aaazzam aaazzam commented Apr 17, 2024

Currently our Modal component creates a "Cancel" action by default even if no actions are passed. Since action-less modals are used for previews, there's no action to cancel. Users instead can use the default top-right "X" to dismiss.

@aaazzam aaazzam requested a review from a team as a code owner April 17, 2024 21:42
Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for prefect-design ready!

Name Link
🔨 Latest commit 2dcaab6
🔍 Latest deploy log https://app.netlify.com/sites/prefect-design/deploys/6620425ac2343b0008379c9b
😎 Deploy Preview https://deploy-preview-1214--prefect-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@pleek91 pleek91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaazzam I looked at how to do this and this idea did not cross my mind. Super simple! This will remove the footer for any existing modals that don't have actions, but that should be fine yeah?

@aaazzam
Copy link
Collaborator Author

aaazzam commented Apr 17, 2024

@pleek91 that's right -- I think it should be fine? The top right "X" is comforting enough of an escape hatch I feel okay making a sweeping thing.

@aaazzam aaazzam merged commit 235a7db into main Apr 17, 2024
6 checks passed
@aaazzam aaazzam deleted the modal-actions branch April 17, 2024 21:51
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.

2 participants