I am currently developing an angular application and using mat-form-field in the following manner.
<mat-form-field appearance="fill">
<mat-label id="title">{{ title }}
</mat-label>
<input formControlName="title" matInput id="title" (click)='updateValue("title")' readonly>
</mat-form-field>
With the above code, I have created a rectangular shaped form field. I am looking to change the color when hovering over the bottom line of the mat form field. To achieve this, I am using the following CSS:
.mat-form-field-ripple {
background-color: #00798e;
}
The issue I am encountering is that I want to change the ripple color based on different conditions. For example, if a variable in my component has a value of X, I want one color, and if it has a value of Y, I want a different color. Since mat-form-field-ripple appears to be an intrinsic property of mat form field, I am unable to dynamically adjust the color at runtime. The color specified in the above code is applied uniformly across all conditions. How can I achieve varying colors based on different conditions?