-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add form as a prop for button kit #1801
Conversation
Allows forms to be connected to a button that is created outside of the form
@@ -15,6 +15,7 @@ type ButtonPropTypes = { | |||
data?: object, | |||
disabled?: boolean, | |||
fixedWidth?: boolean, | |||
form?: string, |
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.
@nehaabraham I made this optional since there will be many instances in Nitro which will not be sending this prop. Once this kit is converted to Typescript, not having the optional ?
will throw errors.
it "form", :aggregate_failures do | ||
expect(subject.new(form: "form-id").options).to include(:form) | ||
expect(subject.new.options).to_not include(:form) | ||
end |
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.
@nehaabraham I also added a test to ensure that form prop is present when sent.
Allows forms to be connected to a button that is created outside of the form.
Screens
[INSERT SCREENSHOT]
Breaking Changes
[Yes/No (Explain)]
Runway Ticket URL
[INSERT URL]
How to test this
[INSERT TESTING DETAILS]
Checklist:
enhancement
,bug
,improvement
,new kit
,deprecated
, orbreaking
. See Changelog & Labels for details.Milano
label when you are ready for a review.