Skip to content

Commit 8afc75c

Browse files
mfranzkenmerget
andauthored
chore: converted declarations to dataset JS API (#4349)
* chore: converted declarations to dataset JS API * Update hover.ts * fix: issue with angular showcase --------- Co-authored-by: Nicolas Merget <[email protected]>
1 parent 7935347 commit 8afc75c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/components/src/components/badge/badge.lite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function DBBadge(props: DBBadgeProps) {
3636
}
3737

3838
if (parent) {
39-
parent.setAttribute('data-has-badge', 'true');
39+
parent.dataset['hasBadge'] = 'true';
4040
}
4141
}
4242
}

packages/components/src/components/tooltip/tooltip.lite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default function DBTooltip(props: DBTooltipProps) {
108108
['mouseleave', 'focusout'].forEach((event) => {
109109
parent.addEventListener(event, () => state.handleLeave());
110110
});
111-
parent.setAttribute('data-has-tooltip', 'true');
111+
parent.dataset['hasTooltip'] = 'true';
112112

113113
if (props.variant === 'label') {
114114
parent.setAttribute('aria-labelledby', state._id);

packages/components/src/utils/floating-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,5 +384,5 @@ export const handleFixedPopover = (
384384
}
385385

386386
element.style.position = 'fixed';
387-
element.setAttribute('data-corrected-placement', correctedPlacement);
387+
element.dataset['correctedPlacement'] = correctedPlacement;
388388
};

0 commit comments

Comments
 (0)