-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-16102] Increase clickable area for bit-item actions #12450
base: main
Are you sure you want to change the base?
Changes from 1 commit
67bf5b4
67b5d95
fc4c0eb
dfc5952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<span [ngClass]="{ 'tw-truncate tw-block': truncate }"> | ||
<ng-content></ng-content> | ||
</span> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { CommonModule } from "@angular/common"; | ||
import { NgModule } from "@angular/core"; | ||
|
||
import { BadgeDirective } from "./badge.directive"; | ||
import { BadgeComponent } from "./badge.component"; | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
exports: [BadgeDirective], | ||
declarations: [BadgeDirective], | ||
exports: [BadgeComponent], | ||
declarations: [BadgeComponent], | ||
}) | ||
export class BadgeModule {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { BadgeDirective, BadgeVariant } from "./badge.directive"; | ||
export { BadgeComponent, BadgeVariant } from "./badge.component"; | ||
export * from "./badge.module"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,9 @@ import { A11yCellDirective } from "../a11y/a11y-cell.directive"; | |
imports: [], | ||
template: `<ng-content></ng-content>`, | ||
providers: [{ provide: A11yCellDirective, useExisting: ItemActionComponent }], | ||
host: { | ||
class: | ||
"[&>button]:tw-relative [&>button:not([bit-item-content])]:before:tw-content-[''] [&>button]:before:tw-absolute [&>button]:before:tw-block [&>button]:before:tw-top-[-0.75rem] [&>button]:before:tw-bottom-[-0.75rem] [&>button]:before:tw-right-[-0.25rem] [&>button]:before:tw-left-[-0.25rem]", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. โ In And if these values are meant to be coupled, would it be helpful to represent them as a shared CSS variable? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm yeah it probably should be. I think I was eyeballing whether or not it looked like the right height and never went back and updated it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For posterity, they don't match because the padding units have a different origin point than the positioning units, but they are updated to be more accurate and responsive to compact mode in this commit: fc4c0eb |
||
}, | ||
}) | ||
export class ItemActionComponent extends A11yCellDirective {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
โน๏ธ The
not([bit-item-content])
is to prevent the:before
area being added to the main item action, which also uses theitem-action
component.