File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
CodeBeam.MudExtensions/Components/InputStyler
ComponentViewer.Docs/Pages/Examples Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 3434 [Category (CategoryTypes .Item .Appearance )]
3535 public string TextColor { get ; set ; }
3636
37+ /// <summary >
38+ /// The label style. Add !important if style doesn't applied.
39+ /// </summary >
40+ [Parameter ]
41+ [Category (CategoryTypes .Item .Appearance )]
42+ public string LabelStyle { get ; set ; }
43+
3744 /// <summary >
3845 /// The label text color. Supports hex values "#ffffff", valid keywords "blue" and CSS variables "var(--mud-palette-primary)"
3946 /// </summary >
122129 }</MudRender>
123130 }
124131 }
132+
133+ @($"{Selector } .mud-input-label {{ {LabelStyle } }}")
125134 </style >
Original file line number Diff line number Diff line change 11@using MudBlazor .Utilities
2- <MudGrid Style = " background-color: var(--mud-palette-background-grey) " >
3- <MudItem xs =" 12" sm =" 8" >
2+ <MudGrid >
3+ <MudItem xs =" 12" sm =" 8" Style = " background-color: var(--mud-palette-background-grey) " >
44 <MudStack >
55 <MudText >Default TextFields</MudText >
66 <MudStack Row =" true" >
3131 </MudStack >
3232
3333 <MudInputStyler Selector =" .text-field" BaseColor =" @(_baseColor?.ToString())" TextColor =" @(_textColor?.ToString())" LabelColor =" @(_labelColor?.ToString())"
34- BorderColor =" @(_borderColor?.ToString())" Always =" _always" />
34+ BorderColor =" @(_borderColor?.ToString())" LabelStyle = " @_labelStyle " Always =" _always" />
3535 <MudInputStyler Selector =" .label-background-grey" LabelBackgroundColor =" @(" var(--mud-palette-background-grey) " )" />
3636 <MudInputStyler Selector =" .label-background-transparent" LabelBackgroundColor =" transparent" />
3737 <MudInputStyler />
4444 <MudColorPicker @bind-Value =" _textColor" Label =" Text Color" ColorPickerView =" ColorPickerView.Grid" Clearable =" true" />
4545 <MudColorPicker @bind-Value =" _labelColor" Label =" Label Color" ColorPickerView =" ColorPickerView.Grid" Clearable =" true" />
4646 <MudColorPicker @bind-Value =" _borderColor" Label =" Border Color" ColorPickerView =" ColorPickerView.Grid" Clearable =" true" />
47+ <MudTextField @bind-Value =" _labelStyle" Label =" Label Style" Variant =" Variant.Outlined" />
4748 <MudButton OnClick =" Reset" >Reset</MudButton >
4849 </MudStack >
4950 </MudItem >
5556 MudColor _labelColor ;
5657 MudColor _borderColor ;
5758 bool _always ;
59+ string _labelStyle ;
5860
5961 private void Reset ()
6062 {
You can’t perform that action at this time.
0 commit comments