Skip to content

Commit bff312f

Browse files
feat(components): remove unused variable in the BitColorPicker component #4196 (#4197)
1 parent c0f9018 commit bff312f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BlazorUI/Bit.BlazorUI/Components/ColorPicker/BitColorPicker.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ public partial class BitColorPicker : IAsyncDisposable
1111
private string? _onWindowPointerUpAbortControllerId;
1212
private string? _onWindowPointerMoveAbortControllerId;
1313
private string? _saturationPickerBackgroundRgbCss;
14-
private string? _saturationPickerBackgroundRgbaCss;
1514
private bool _saturationPickerPointerDown;
1615
private BitColorPosition? _saturationPickerThumbPosition;
1716
private BitColor _color = new();
1817
private BitColorType _colorType;
1918
private double _hue;
2019
private double _selectedSaturation = 1;
2120
private double _selectedValue = 1;
22-
private string _colorRectangleDescriptionId => $"ColorRectangle-Description-{UniqueId}";
21+
private string? _colorRectangleDescriptionId;
2322

2423
public string? Hex => _color.Hex;
2524
public string? Rgb => _color.Rgb;
@@ -91,6 +90,8 @@ public string Color
9190

9291
protected override void OnInitialized()
9392
{
93+
_colorRectangleDescriptionId = $"ColorRectangle-Description-{UniqueId}";
94+
9495
SetSaturationPickerBackground();
9596

9697
base.OnInitialized();
@@ -129,7 +130,6 @@ private async Task SetPositionAsync()
129130
private void SetSaturationPickerBackground()
130131
{
131132
var bitColor = new BitColor(_hue, 1, 1, 1);
132-
_saturationPickerBackgroundRgbaCss = bitColor.Rgba;
133133
_saturationPickerBackgroundRgbCss = bitColor.Rgb;
134134
}
135135

0 commit comments

Comments
 (0)