-
Notifications
You must be signed in to change notification settings - Fork 11
feat(button): added possibility to set commandfor
and command
attributes
#4408
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -79,6 +79,16 @@ export type DBButtonDefaultProps = { | |||||
* Variant of the button. Use only 1 primary button on a page as CTA otherwise use one of the adaptive buttons. | ||||||
*/ | ||||||
variant?: ButtonVariantType | string; | ||||||
|
||||||
/** | ||||||
* Either standardized or custom actions to be performed on an element that is being controlled by a control <button>, specified via the commandfor attribute. (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#commandfor) | ||||||
*/ | ||||||
commandfor?: string; | ||||||
|
||||||
/** | ||||||
* Turns a <button> HTML element into a command button, controlling the given interactive element; takes the ID of the element to control as its value. (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#command) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The documentation describes the
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
*/ | ||||||
command?: string; | ||||||
}; | ||||||
|
||||||
export type DBButtonProps = DBButtonDefaultProps & | ||||||
|
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.
The documentation comment appears to be incomplete or unclear. The phrase 'Either standardized or custom actions to be performed on an element that is being controlled by a control ' is confusing. Consider clarifying that this attribute specifies the ID of the element to be controlled.
Copilot uses AI. Check for mistakes.