feat(tabs): add icon support for tabs (#926)
* feat(tabs): add icon support for tabs - Introduced an `icon` property for tabs to display icons alongside tab labels. - Updated the tabs shortcode and HTML partials to accommodate the new icon feature. - Enhanced documentation for tabs to include examples of using icons in tab definitions. * chore: rebuild css * doc(tabs): add icon support in tab documentation for multiple languages - Enhanced documentation for tabs to include examples of using the `icon` parameter in Persian, Japanese, and Simplified Chinese. - Updated the tab shortcode examples to demonstrate how to display icons alongside tab labels. * chore: regenerate compiled css * fix(a11y): add aria-hidden to decorative tab icons Add aria-hidden="true" to tab icon SVGs so screen readers skip decorative icons and only announce the tab name. Update @example docblock in tab.html to demonstrate the icon parameter. * doc(tabs): improve icon section with better examples and icon page link Rename "Tabs With Icons" heading to "Add Icons" for consistency with other action-oriented section titles. Replace JSON/YAML/TOML icon example with Photos/Music/Videos using photograph, music-note, and film icons that naturally match their labels. Add link to the Icon shortcode page so users can discover available icon names.
This commit is contained in:
2
assets/css/compiled/main.css
generated
2
assets/css/compiled/main.css
generated
File diff suppressed because one or more lines are too long
@@ -36,9 +36,10 @@
|
||||
|
||||
document.querySelectorAll('.hextra-tabs-toggle').forEach((button) => {
|
||||
button.addEventListener('click', function (e) {
|
||||
const container = e.target.parentElement;
|
||||
const targetButton = e.currentTarget;
|
||||
const container = targetButton.parentElement;
|
||||
const index = Array.from(container.querySelectorAll('.hextra-tabs-toggle')).indexOf(
|
||||
e.target
|
||||
targetButton
|
||||
);
|
||||
|
||||
if (container.dataset.tabGroup) {
|
||||
|
||||
Reference in New Issue
Block a user