1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-16 16:59:30 +00:00

[CL-244] readonly fields (#10164)

* add readonly styles

* update label styles; update stories

* code review changes
This commit is contained in:
Will Martin
2024-07-24 08:55:57 -04:00
committed by GitHub
parent b863488406
commit 4a3aa66f85
6 changed files with 135 additions and 21 deletions

View File

@@ -40,7 +40,7 @@ export class BitInputDirective implements BitFormFieldControl {
"tw-bg-background",
"tw-border-none",
"focus:tw-outline-none",
"[&:is(input,textarea):read-only]:tw-bg-secondary-100",
"[&:is(input,textarea):disabled]:tw-bg-secondary-100",
];
if (this.parentFormField === null) {
@@ -118,6 +118,10 @@ export class BitInputDirective implements BitFormFieldControl {
});
}
get readOnly(): boolean {
return this.elementRef.nativeElement.readOnly;
}
get standaloneInputClasses() {
return [
"tw-px-3",