feat(GlDisclosureDropdown): wrap custom item content in `button` or `link`
Previously when `list-item` slot was used, it wrapped content into styled `span`s but user had to render button or link themselves. Thus to overwrite those elements styles and set the `tabindex`. It proved to be a poor DevX. With this change the content provided to the `list-item` slot will automatically be wrapped in a styled button or link with a correct `tabindex`. Button or link will be decided based on the provided `item` prop. If it has `href` prop - then the link is rendered. Button otherwise. When totally custom content is needed, it can be provided to the `default` slot of the `GlDisclosureDropdownItem`. BREAKING CHANGE: It will cause styling and semantic issues in the downstream project. Wherever the `list-item` slot is used with a `button` or `a` inside it wrapping the content, this wrapper `button/a` needs to be removed.
Loading
-
mentioned in commit b721f3c9
-
mentioned in merge request gitlab-org/frontend/pajamas-adoption-scanner!122 (merged)
-
mentioned in merge request gitlab!112195 (merged)
-
mentioned in merge request status-page!709 (merged)
-
mentioned in merge request gitlab-docs!3565 (merged)
-
mentioned in merge request gitlab-org/gitlab-services/design.gitlab.com!3267 (merged)
Please register or sign in to comment