diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor index 63e4f4f76d..bc20e88c7a 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor @@ -11,17 +11,15 @@ ComponentSubEnums="componentSubEnums"> +
Basic usage examples of BitRating, including disabled and readonly states.
+
Basic:
-
-
Disabled:
-
-
ReadOnly:
@@ -30,6 +28,8 @@ +
Demonstrating different visibility options: visible, hidden, and collapsed.
+
Visible: [ ]
Hidden: [ ]
@@ -40,30 +40,32 @@ +
Explore styling and class customization for BitRating, including component styles, custom classes, and detailed styles.
+

-
Component's Style & Class:
- - - +
Component's Style & Class:

+
+ +
+ +


- -
Styles & Classes:
- - +
Styles & Classes:

+ +
+
+
Adjust the maximum rating value to customize the rating scale.
+
Max is 6
-
-
Max is 100
@@ -74,17 +76,15 @@ +
Customize the rating icons to better match the context, such as hearts, checkboxes, or likes.
+
Heart:
-
-
Checkbox:
-
-
Like:
@@ -93,17 +93,15 @@ +
Set different sizes for the rating component: small, medium, and large.
+
Small:
-
-
Medium:
-
-
Large:
@@ -112,19 +110,17 @@ +
Examples of one-way and two-way data binding with BitRating, as well as change event handling.
+
One-way:
-
-
Two-way:
-
-
OnChange:
Changed Value: @onChangeValue @@ -134,6 +130,8 @@ +
Validate the rating component using data annotations in a form submission.
+
@if (string.IsNullOrEmpty(SuccessMessage)) { @@ -159,7 +157,9 @@ -
+
Use the BitRating component in right-to-left (RTL).
+
+
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.cs index 7e52442521..c4196c3af4 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.cs @@ -200,28 +200,35 @@ private void HandleInvalidSubmit() private readonly string example3RazorCode = @" - + + - -"; + + + +"; private readonly string example4RazorCode = @" diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.scss b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.scss index e4df8f792b..b04b6bb2e8 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.scss +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Rating/BitRatingDemo.razor.scss @@ -1,4 +1,6 @@ -.example-box { +@import '../../../../Styles/abstracts/_bit-css-variables.scss'; + +.example-box { display: flex; width: fit-content; flex-direction: column; @@ -6,20 +8,26 @@ ::deep { .custom-class { - padding: 0.5rem; - border: 1px solid red; - max-width: max-content; + margin-inline: 1rem; + border-radius: 0.25rem; + padding-inline: 0.5rem; + border: 1px solid dodgerblue; + box-shadow: dodgerblue 0 0 1rem; } .custom-selected { - color: blueviolet; + color: seagreen; } .custom-unselected { - color: darkorange; + color: mediumseagreen; + } + + .custom-unselected:hover { + color: lightseagreen; } .validation-message { - color: red; + color: $bit-color-error; } }