diff --git a/src/BootstrapBlazor.Server/Components/Samples/Lights.razor b/src/BootstrapBlazor.Server/Components/Samples/Lights.razor
index 3f2f2733bcb..5c8c3f7ef22 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Lights.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/Lights.razor
@@ -94,13 +94,13 @@
IsFlash",
+ "LightsFlashingIntro": "Flash the light by setting the parameter IsFlash",
"LightsColorTitle": "discoloration",
- "LightsColorIntro": "Color the light by setting the value of the property Color",
+ "LightsColorIntro": "Color the light by setting the value of the parameter Color",
"LightsTooltipTextTitle": "prompt text",
"LightsTooltipTextIntro": "By setting the value of the attribute TooltipText to make the tooltip text prompt when the mouse hovers over the indicator light",
- "TooltipText": "I am prompt text message"
+ "TooltipText": "I am prompt text message",
+ "LightsFlatTitle": "Flat",
+ "LightsFlatIntro": "Make the indicator light flat by setting the parameter IsFlat"
},
"BootstrapBlazor.Server.Components.Samples.Charts.Index": {
"Chart": "Chart",
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index 752915f9235..987242b7deb 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -490,7 +490,9 @@
"LightsColorIntro": "通过设置属性 Color 值使指示灯进行变色",
"LightsTooltipTextTitle": "提示文字",
"LightsTooltipTextIntro": "通过设置属性 TooltipText 值使鼠标悬浮指示灯上时提示 tooltip 文字",
- "TooltipText": "我是提示文字信息"
+ "TooltipText": "我是提示文字信息",
+ "LightsFlatTitle": "扁平化",
+ "LightsFlatIntro": "通过设置属性 IsFlat 使指示灯扁平化"
},
"BootstrapBlazor.Server.Components.Samples.Charts.Index": {
"Chart": "Chart 图表",
diff --git a/src/BootstrapBlazor/Components/Light/Light.razor.cs b/src/BootstrapBlazor/Components/Light/Light.razor.cs
index 645f3867397..207a8e30ffb 100644
--- a/src/BootstrapBlazor/Components/Light/Light.razor.cs
+++ b/src/BootstrapBlazor/Components/Light/Light.razor.cs
@@ -16,6 +16,7 @@ public partial class Light
protected string? ClassString => CssBuilder.Default("light")
.AddClass("is-flat", IsFlat)
.AddClass("flash", IsFlash && !IsFlat)
+ .AddClass("is-flat-flash", IsFlash && IsFlat)
.AddClass($"light-{Color.ToDescriptionString()}", Color != Color.None)
.AddClassFromAttributes(AdditionalAttributes)
.Build();
diff --git a/src/BootstrapBlazor/Components/Light/Light.razor.scss b/src/BootstrapBlazor/Components/Light/Light.razor.scss
index f5f8d89eb55..ee8e22ad6d9 100644
--- a/src/BootstrapBlazor/Components/Light/Light.razor.scss
+++ b/src/BootstrapBlazor/Components/Light/Light.razor.scss
@@ -76,6 +76,9 @@
height: 100%;
border-radius: 50%;
border: 1px solid var(--bb-light-bg);
+ }
+
+ &.is-flat-flash:after {
animation: light-flat 1.2s infinite ease-in-out;
}
}
@@ -196,7 +199,7 @@
@include animation(light-danger, #e17777, #892726);
@include animation(light-success, #5cb85c, #116811);
@include animation(light-info, #5bc0de, #1d7792);
-@include animation(light-light-warning, #ffc107, #cc9f18);
+@include animation(light-warning, #ffc107, #cc9f18);
@include animation(light-primary, #007bff, #0f5fb5);
@include animation(light-secondary, #6c757d, #4b5054);
@include animation(light-dark, #6061e2, #3232a0);
diff --git a/test/UnitTest/Components/LightTest.cs b/test/UnitTest/Components/LightTest.cs
index f16276d9f7c..c03bcbd07d2 100644
--- a/test/UnitTest/Components/LightTest.cs
+++ b/test/UnitTest/Components/LightTest.cs
@@ -11,14 +11,16 @@ public class LightTest : BootstrapBlazorTestBase
public void IsFlash_Ok()
{
var cut = Context.RenderComponent