1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +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

@@ -17,18 +17,20 @@ export class BitInputDirective {
"tw-bg-background-alt",
"tw-border",
"tw-border-solid",
"tw-rounded",
this.hasError ? "tw-border-danger-500" : "tw-border-secondary-500",
"tw-text-main",
"tw-placeholder-text-muted",
// Rounded
"tw-rounded-none",
"first:tw-rounded-l",
"last:tw-rounded-r",
// Focus
"focus:tw-outline-none",
"focus:tw-border-primary-700",
"focus:tw-ring-1",
"focus:tw-ring-primary-700",
"focus:tw-z-10",
"disabled:tw-bg-secondary-100",
this.hasPrefix ? "tw-rounded-l-none" : "",
this.hasSuffix ? "tw-rounded-r-none" : "",
this.hasError ? "tw-border-danger-500" : "tw-border-secondary-500",
].filter((s) => s != "");
}