1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00
Files
browser/libs/components/src/form-field/prefix.directive.ts
2022-07-18 19:08:41 +02:00

25 lines
547 B
TypeScript

import { Directive, HostBinding, Input } from "@angular/core";
export const PrefixClasses = [
"tw-block",
"tw-px-3",
"tw-py-1.5",
"tw-bg-background-alt",
"tw-border",
"tw-border-solid",
"tw-border-secondary-500",
"tw-text-muted",
"tw-rounded-none",
"disabled:!tw-text-muted",
"disabled:tw-border-secondary-500",
];
@Directive({
selector: "[bitPrefix]",
})
export class BitPrefixDirective {
@HostBinding("class") @Input() get classList() {
return PrefixClasses.concat(["tw-border-r-0", "first:tw-rounded-l"]);
}
}