1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

[PS-960] Fix form input group suffix not working (#2947)

* Fix form suffix not working without prefix

* Use tailwind first/last to avoid hacky components
This commit is contained in:
Oscar Hinton
2022-06-23 20:24:26 +02:00
committed by GitHub
parent fcdf36a01c
commit 6e9b6f25a1
6 changed files with 10 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ export const PrefixClasses = [
"tw-border-solid",
"tw-border-secondary-500",
"tw-text-muted",
"tw-rounded",
"tw-rounded-none",
];
@Directive({
@@ -17,12 +17,6 @@ export const PrefixClasses = [
})
export class BitPrefixDirective {
@HostBinding("class") @Input() get classList() {
return PrefixClasses.concat([
"tw-border-r-0",
"tw-rounded-r-none",
!this.first ? "tw-rounded-l-none" : "",
]).filter((c) => c != "");
return PrefixClasses.concat(["tw-border-r-0", "first:tw-rounded-l"]);
}
@Input() first = false;
}