-
Notifications
You must be signed in to change notification settings - Fork 27
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
Provide new prop to add content to left area of form dialog #3587
Provide new prop to add content to left area of form dialog #3587
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 046d7bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@ddouglasz thanks, looks perfect on the screenshot, but if you look at the Percy screenshots it looks like the buttons are nudged to the left. |
@FilPob Thats true, I noticed it too, fixing it now. I will update it soon. Thanks! FIxed here: 9a98d8f |
FIxed here: 9a98d8f |
Thanks! Looks good now. And Yes we should also add a short description of the prop to the docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🤗
@@ -31,6 +31,7 @@ export type TFormDialogProps = { | |||
dataAttributesPrimaryButton?: { [key: string]: string }; | |||
getParentSelector?: () => HTMLElement; | |||
iconLeftSecondaryButton?: ReactElement; | |||
leftAlignedFooterContent?: ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this simply footerContent
?
It will always be left aligned to the buttons. It also gives more flexibility in case the layout changes in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's due to the iconLeftSecondaryButton existing also to be consistent. I also would like footerElement more cause we're passing a React element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @tdeekens that would also work. I think both names suggested cover the scope of the prop and its use case.
I could change it if you want.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddouglasz Maybe check in App Kit and UI Kit if there are similar cases and see what kind of naming we are using there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you for the suggestion. We have cases like these mostly with "content". Like the MaintenancePageLayout with a prop of bodyContent?: ReactNode;
packages/application-components/src/components/dialogs/internals/dialog-footer.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Summary
Add a new property
leftAlignedFooterContent
to the form dialog. This provides an additional content positioned to the left area of the form dialog footer.Screenshots