Shopify / polaris

Shopify’s design system to help us work together to build a great experience for all of our merchants.
https://polaris.shopify.com
Other
5.77k stars 1.17k forks source link

[Modal] Allow ComplexAction to receive `submit` for form submission #4749

Closed evadecker closed 1 year ago

evadecker commented 2 years ago

Issue summary

There doesn't appear to be a way to use the primaryAction prop on a Modal to submit a form. The Polaris Button includes a submit prop for form submission; Buttons passed in as objects (ComplexAction) do not include the ability to set submit.

Expected behavior

ComplexAction—like Button—should accept submit so that the default styling and positioning of Modal buttons can be maintained.

Actual behavior

Instead of supplying a primaryAction, it's necessary to use ButtonGroup and Button within the contents of Modal. Writing custom markup means that buttons are aligned left and do not include a dividing border with the contents of the modal, creating inconsistency.

github-actions[bot] commented 1 year ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's design system and dev experience.

rajashravan commented 1 year ago

wondering if this has been addressed