mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
[CL-181] Fix toggle group badge alignment (#8167)
This commit is contained in:
parent
8af1a1528b
commit
f95ff93a71
@ -30,23 +30,15 @@ type Story = StoryObj<ToggleGroupComponent>;
|
||||
export const Default: Story = {
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `
|
||||
template: /* HTML */ `
|
||||
<bit-toggle-group [(selected)]="selected" aria-label="People list filter">
|
||||
<bit-toggle value="all">
|
||||
All <span bitBadge variant="info">3</span>
|
||||
</bit-toggle>
|
||||
<bit-toggle value="all"> All <span bitBadge variant="info">3</span> </bit-toggle>
|
||||
|
||||
<bit-toggle value="invited">
|
||||
Invited
|
||||
</bit-toggle>
|
||||
<bit-toggle value="invited"> Invited </bit-toggle>
|
||||
|
||||
<bit-toggle value="accepted">
|
||||
Accepted <span bitBadge variant="info">2</span>
|
||||
</bit-toggle>
|
||||
<bit-toggle value="accepted"> Accepted <span bitBadge variant="info">2</span> </bit-toggle>
|
||||
|
||||
<bit-toggle value="deactivated">
|
||||
Deactivated
|
||||
</bit-toggle>
|
||||
<bit-toggle value="deactivated"> Deactivated </bit-toggle>
|
||||
</bit-toggle-group>
|
||||
`,
|
||||
}),
|
||||
|
@ -70,10 +70,8 @@ export class ToggleComponent<TValue> {
|
||||
// Fix for bootstrap styles that add bottom margin
|
||||
"!tw-mb-0",
|
||||
|
||||
// Fix for badge being pushed slightly lower when inside a button.
|
||||
// Inspired by bootstrap, which does the same.
|
||||
"[&>[bitBadge]]:tw-relative",
|
||||
"[&>[bitBadge]]:tw--top-px",
|
||||
// Fix for badge being slightly off center vertically
|
||||
"[&>[bitBadge]]:tw-mt-px",
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user