1- namespace Bit . BlazorUI . Demo . Client . Core . Pages . Components . Surfaces . Accordion ;
1+ namespace Bit . BlazorUI . Demo . Client . Core . Pages . Components . Surfaces . Accordion ;
22
33public partial class BitAccordionDemo
44{
55 private readonly List < ComponentParameter > componentParameters =
66 [
7+ new ( )
8+ {
9+ Name = "Background" ,
10+ Type = "BitColorKind?" ,
11+ DefaultValue = "null" ,
12+ Description = "The color kind of the background of the accordion." ,
13+ LinkType = LinkType . Link ,
14+ Href = "#color-kind-enum" ,
15+ } ,
16+ new ( )
17+ {
18+ Name = "Border" ,
19+ Type = "BitColorKind?" ,
20+ DefaultValue = "null" ,
21+ Description = "The color kind of the border of the accordion." ,
22+ LinkType = LinkType . Link ,
23+ Href = "#color-kind-enum" ,
24+ } ,
725 new ( )
826 {
927 Name = "Body" ,
@@ -92,6 +110,43 @@ public partial class BitAccordionDemo
92110 }
93111 ] ;
94112
113+ private readonly List < ComponentSubEnum > componentSubEnums =
114+ [
115+ new ( )
116+ {
117+ Id = "color-kind-enum" ,
118+ Name = "BitColorKind" ,
119+ Description = "Defines the color kinds available in the bit BlazorUI." ,
120+ Items =
121+ [
122+ new ( )
123+ {
124+ Name = "Primary" ,
125+ Description = "The primary color kind." ,
126+ Value = "0" ,
127+ } ,
128+ new ( )
129+ {
130+ Name = "Secondary" ,
131+ Description = "The secondary color kind." ,
132+ Value = "1" ,
133+ } ,
134+ new ( )
135+ {
136+ Name = "Tertiary" ,
137+ Description = "The tertiary color kind." ,
138+ Value = "2" ,
139+ } ,
140+ new ( )
141+ {
142+ Name = "Transparent" ,
143+ Description = "The transparent color kind." ,
144+ Value = "3" ,
145+ } ,
146+ ]
147+ }
148+ ] ;
149+
95150 private readonly List < ComponentSubClass > componentSubClasses =
96151 [
97152 new ( )
@@ -169,6 +224,9 @@ public partial class BitAccordionDemo
169224
170225
171226
227+ private BitColorKind backgroundColorKind = BitColorKind . Primary ;
228+ private BitColorKind borderColorKind = BitColorKind . Primary ;
229+
172230 private byte controlledAccordionExpandedItem = 1 ;
173231
174232 private bool AccordionToggleIsEnabled ;
@@ -199,6 +257,50 @@ These placeholder words symbolize the beginning—a moment of possibility where
199257</BitAccordion>" ;
200258
201259 private readonly string example3RazorCode = @"
260+ <BitChoiceGroup @bind-Value=""backgroundColorKind"" Horizontal
261+ TItem=""BitChoiceGroupOption<BitColorKind>"" TValue=""BitColorKind"">
262+ <BitChoiceGroupOption Text=""Primary"" Value=""BitColorKind.Primary"" />
263+ <BitChoiceGroupOption Text=""Secondary"" Value=""BitColorKind.Secondary"" />
264+ <BitChoiceGroupOption Text=""Tertiary"" Value=""BitColorKind.Tertiary"" />
265+ <BitChoiceGroupOption Text=""Transparent"" Value=""BitColorKind.Transparent"" />
266+ </BitChoiceGroup>
267+
268+ <div style=""padding:2rem;background:gray"">
269+ <BitAccordion Title=""Accordion"" Background=""backgroundColorKind"">
270+ Every story starts with a blank canvas, a quiet space waiting to be filled with ideas, emotions, and dreams.
271+ These placeholder words symbolize the beginning—a moment of possibility where creativity has yet to take shape.
272+ Imagine this text as the scaffolding of something remarkable, a foundation upon which connections and
273+ inspirations will be built. Soon, these lines will transform into narratives that provoke thought,
274+ spark emotion, and resonate with those who encounter them. Until then, they remind us of the beauty
275+ in potential the quiet magic of beginnings, where everything is still to come, and the possibilities
276+ are boundless. This space is yours to craft, yours to shape, yours to bring to life.
277+ </BitAccordion>
278+ </div>" ;
279+ private readonly string example3CsharpCode = @"
280+ private BitColorKind backgroundColorKind = BitColorKind.Primary;" ;
281+
282+ private readonly string example4RazorCode = @"
283+ <BitChoiceGroup @bind-Value=""borderColorKind"" Horizontal
284+ TItem=""BitChoiceGroupOption<BitColorKind>"" TValue=""BitColorKind"">
285+ <BitChoiceGroupOption Text=""Primary"" Value=""BitColorKind.Primary"" />
286+ <BitChoiceGroupOption Text=""Secondary"" Value=""BitColorKind.Secondary"" />
287+ <BitChoiceGroupOption Text=""Tertiary"" Value=""BitColorKind.Tertiary"" />
288+ <BitChoiceGroupOption Text=""Transparent"" Value=""BitColorKind.Transparent"" />
289+ </BitChoiceGroup>
290+
291+ <BitAccordion Title=""Accordion"" Border=""borderColorKind"">
292+ Every story starts with a blank canvas, a quiet space waiting to be filled with ideas, emotions, and dreams.
293+ These placeholder words symbolize the beginning—a moment of possibility where creativity has yet to take shape.
294+ Imagine this text as the scaffolding of something remarkable, a foundation upon which connections and
295+ inspirations will be built. Soon, these lines will transform into narratives that provoke thought,
296+ spark emotion, and resonate with those who encounter them. Until then, they remind us of the beauty
297+ in potential the quiet magic of beginnings, where everything is still to come, and the possibilities
298+ are boundless. This space is yours to craft, yours to shape, yours to bring to life.
299+ </BitAccordion>" ;
300+ private readonly string example4CsharpCode = @"
301+ private BitColorKind borderColorKind = BitColorKind.Primary;" ;
302+
303+ private readonly string example5RazorCode = @"
202304<BitAccordion Title=""Accordion 1"">
203305 Once upon a time, stories wove connections between people, a symphony of voices crafting shared dreams.
204306 Each word carried meaning, each pause brought understanding. Placeholder text reminds us of that moment
@@ -228,7 +330,7 @@ each word has the power to transform into something extraordinary. Here lies the
228330 begins here, in this quiet moment where everything is possible.
229331</BitAccordion>" ;
230332
231- private readonly string example4RazorCode = @"
333+ private readonly string example6RazorCode = @"
232334<BitAccordion Title=""General settings"" Description=""The general settings of the application"">
233335 Every story starts with a blank canvas, a quiet space waiting to be filled with ideas, emotions, and dreams.
234336 These placeholder words symbolize the beginning—a moment of possibility where creativity has yet to take shape.
@@ -239,7 +341,7 @@ These placeholder words symbolize the beginning—a moment of possibility where
239341 are boundless. This space is yours to craft, yours to shape, yours to bring to life.
240342</BitAccordion>" ;
241343
242- private readonly string example5RazorCode = @"
344+ private readonly string example7RazorCode = @"
243345<BitAccordion Title=""General settings""
244346 Description=""I am an accordion""
245347 OnClick=""() => controlledAccordionExpandedItem = 1""
@@ -277,10 +379,10 @@ each word has the power to transform into something extraordinary. Here lies the
277379 idea that sparks change, these lines are yours to fill, to shape, and to make uniquely yours. The journey
278380 begins here, in this quiet moment where everything is possible.
279381</BitAccordion>" ;
280- private readonly string example5CsharpCode = @"
382+ private readonly string example7CsharpCode = @"
281383private byte controlledAccordionExpandedItem = 1;" ;
282384
283- private readonly string example6RazorCode = @"
385+ private readonly string example8RazorCode = @"
284386<BitToggle @bind-Value=""AccordionToggleIsEnabled"" OnText=""Enabled"" OffText=""Disabled"" />
285387<BitToggle @bind-Value=""AccordionToggleIsExpanded"" OnText=""Expanded"" OffText=""Collapsed"" />
286388
@@ -296,11 +398,11 @@ These placeholder words symbolize the beginning—a moment of possibility where
296398 in potential the quiet magic of beginnings, where everything is still to come, and the possibilities
297399 are boundless. This space is yours to craft, yours to shape, yours to bring to life.
298400</BitAccordion>" ;
299- private readonly string example6CsharpCode = @"
401+ private readonly string example8CsharpCode = @"
300402private bool AccordionToggleIsEnabled;
301403private bool AccordionToggleIsExpanded;" ;
302404
303- private readonly string example7RazorCode = @"
405+ private readonly string example9RazorCode = @"
304406<style>
305407 .custom-header {
306408 gap: 1rem;
@@ -355,7 +457,7 @@ These placeholder words symbolize the beginning—a moment of possibility where
355457 </BitCarousel>
356458</BitAccordion>" ;
357459
358- private readonly string example8RazorCode = @"
460+ private readonly string example10RazorCode = @"
359461<BitAccordion Dir=""BitDir.Rtl""
360462 Title=""تنظیمات""
361463 Description=""من یک آکاردئون هستم!"">
0 commit comments