1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-05 19:23:19 +00:00
Files
browser/libs/components/src/table/row.directive.ts
Oscar Hinton 26fb7effd3 Remove standalone true from platform and UIF (#15032)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 20:03:04 +02:00

34 lines
757 B
TypeScript

import { Directive, HostBinding, Input } from "@angular/core";
@Directive({
selector: "tr[bitRow]",
})
export class RowDirective {
@Input() alignContent: "top" | "middle" | "bottom" | "baseline" = "middle";
get alignmentClass(): string {
switch (this.alignContent) {
case "top":
return "tw-align-top";
case "middle":
return "tw-align-middle";
case "bottom":
return "tw-align-bottom";
default:
return "tw-align-baseline";
}
}
@HostBinding("class") get classList() {
return [
"tw-border-0",
"tw-border-b",
"tw-border-secondary-300",
"tw-border-solid",
"hover:tw-bg-background-alt",
"last:tw-border-0",
this.alignmentClass,
];
}
}