Skip to content

Commit 084a391

Browse files
committed
feat(badge): clamp position on labels
1 parent bf60e08 commit 084a391

31 files changed

Lines changed: 45 additions & 31 deletions

File tree

core/src/components/avatar/avatar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export class Avatar implements ComponentInterface {
2222

2323
private badgeManager = createBadgeManager(this.el, () => ({
2424
target: this.el,
25-
isTargetArched: true,
2625
}));
2726

2827
/**

core/src/components/button/button.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
4545
host: this.el,
4646
target: this.el.shadowRoot!.querySelector('.button-native')!,
4747
relativeTo: this.el.shadowRoot!.querySelector('.button-inner')!,
48-
isTargetArched: true,
4948
}));
5049

5150
/**

core/src/components/tab-button/tab-button.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,14 @@ export class TabButton implements ComponentInterface, AnchorInterface {
5959
if (!target) {
6060
return undefined;
6161
}
62+
const isLabelTarget = target === labelEl;
6263

6364
return {
6465
host: this.el,
6566
target,
6667
relativeTo: this.el.shadowRoot!.querySelector('.button-inner')!,
68+
anchorToEdge: !isLabelTarget,
69+
clamp: !isLabelTarget && hasLabel,
6770
};
6871
});
6972

1.18 KB
Loading
973 Bytes
Loading
1.77 KB
Loading
1.16 KB
Loading
1.19 KB
Loading
1.39 KB
Loading
808 Bytes
Loading

0 commit comments

Comments
 (0)