diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor index c6fffbc238..11a1508c08 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor @@ -5,39 +5,45 @@ Description="callout component of the bit BlazorUI components" /> - - - Click me - - -
- This is the callout content. -
-
-
+
Basic usage of BitCallout component with a simple content and a button as the anchor to show or hide the callout.
+
+
+ + + Show callout + + +
+ This is the callout content. +
+
+
+
+
Use an external element as the anchor for a BitCallout component, with both ID-based and ElementSelector-based anchoring options.
+
AnchorId -
+
-
+
@@ -47,19 +53,122 @@ +
Bind the Open state of BitCallout component to a boolean variable, allowing for more control over its opening and closing behavior.
+
- Open callout + Show callout -
+
This is the callout content. +
+ You can even close it from here! +

+
+ Done + Cancel +
+
+ + +
+ + + + + +
Explores different drop directions for the BitCallout component, including automatic and explicit directions.
+

+
+
DropDirection: All

+ + + Show callout + + +
+ @for (int i = 1; i < 13; i++) + { + var item = i; +
Callout content @(item)

+ }
+

+
DropDirection: TopAndBottom

+ + + Show callout + + +
+ @for (int i = 1; i < 13; i++) + { + var item = i; +
Callout content @(item)

+ } +
+
+
+
+
+
+ + + +
Explores styling and class customization for BitCallout, including component styles, custom classes, and detailed style options.
+
+
+
Component's Style & Class:

+ + + Show callout + + +
+ This is the callout content. +
+
+
+
+ + + Show callout + + +
+ This is the callout content. +
+
+
+

+
Styles & Classes:

+ + + Show callout + + +
+ This is the callout content. +
+
+
+
+ + + Show callout + + + This is the callout content. + +
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs index e8efa890e3..83152f80b1 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.cs @@ -213,10 +213,10 @@ public partial class BitCalloutDemo private readonly string example1RazorCode = @" - Click me + Show callout -
+
This is the callout content.
@@ -225,15 +225,14 @@ This is the callout content. private readonly string example2RazorCode = @" callout1.Toggle()"">AnchorId -
+
- anchorEl"" @ref=""callout2""> -
+
"; @@ -243,18 +242,124 @@ This is the callout content. private BitCallout callout2;"; private readonly string example3RazorCode = @" - isOpen = true"">Open callout + isOpen = true"">Show callout -
+
This is the callout content. +
+ You can even close it from here! +

+
+ isOpen = false"">Done + isOpen = false"" Variant=""BitVariant.Outline"">Cancel +
"; private readonly string example3CsharpCode = @" private bool isOpen;"; + + private readonly string example4RazorCode = @" + + + Show callout + + +
+ @for (int i = 1; i < 13; i++) + { + var item = i; +
Callout content @(item)

+ } +
+
+
+ + + + Show callout + + +
+ @for (int i = 1; i < 13; i++) + { + var item = i; +
Callout content @(item)

+ } +
+
+
"; + + private readonly string example5RazorCode = @" + + + + + + Show callout + + +
+ This is the callout content. +
+
+
+ + + + Show callout + + +
+ This is the callout content. +
+
+
+ + + + + Show callout + + +
+ This is the callout content. +
+
+
+ + + + Show callout + + + This is the callout content. + +"; } diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.scss b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.scss index 6b8dee934b..e33daa4eff 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.scss +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Surfaces/Callout/BitCalloutDemo.razor.scss @@ -1,4 +1,26 @@ .example-box { gap: 3rem; display: flex; + flex-wrap: wrap; +} + +::deep { + .custom-class { + width: fit-content; + box-shadow: dodgerblue 0px 0px 8px; + } + + .custom-content { + padding: 16px; + border-radius: 2px; + box-shadow: #a9a9a92e 0px 0px 4px 2px; + } + + .custom-anchor { + color: white; + cursor: pointer; + padding: 8px 16px; + border-radius: 2px; + background-color: darkviolet; + } }