From fa41a143f0c05ac5f1afd3343bcb1f720489e477 Mon Sep 17 00:00:00 2001 From: tesar-tech Date: Thu, 12 Dec 2024 19:30:40 +0100 Subject: [PATCH] rm collapsed from button --- .../Blazorise.Bootstrap5/Components/Button.cs | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/Source/Blazorise.Bootstrap5/Components/Button.cs b/Source/Blazorise.Bootstrap5/Components/Button.cs index 79d158aaa1..896047c6b3 100644 --- a/Source/Blazorise.Bootstrap5/Components/Button.cs +++ b/Source/Blazorise.Bootstrap5/Components/Button.cs @@ -10,28 +10,8 @@ namespace Blazorise.Bootstrap5.Components; public class Button : Blazorise.Button { - #region Members - - bool collapseVisible; - - #endregion - #region Methods - protected override void BuildClasses( ClassBuilder builder ) - { - if ( ParentCollapseHeader?.ParentCollapse != null ) - { - // if ( ParentCollapseHeader.ParentCollapse.InsideAccordion ) - // builder.Append( "accordion-button" ); - - if ( !CollapseVisible ) - builder.Append( "collapsed" ); - } - - base.BuildClasses( builder ); - } - protected override void BuildRenderTree( RenderTreeBuilder builder ) { builder @@ -59,11 +39,6 @@ protected override void BuildRenderTree( RenderTreeBuilder builder ) } } - if ( ParentCollapseHeader?.ParentCollapse != null ) - { - builder.AriaExpanded( ParentCollapseHeader.ParentCollapse.Visible.ToString().ToLowerInvariant() ); - } - builder.OnClick( this, EventCallback.Factory.Create( this, ClickHandler ) ); builder.OnClickPreventDefault( Type == ButtonType.Link && To != null && To.StartsWith( "#" ) ); @@ -99,27 +74,4 @@ protected override RenderFragment ProvideDefaultLoadingTemplate() #endregion - #region Properties - - /// - /// Gets or sets the content visibility. - /// - [CascadingParameter( Name = "CollapseVisible" )] - public bool CollapseVisible - { - get => collapseVisible; - set - { - collapseVisible = value; - - DirtyClasses(); - } - } - - /// - /// Gets or sets the cascaded parent collapse header component. - /// - [CascadingParameter] protected CollapseHeader ParentCollapseHeader { get; set; } - - #endregion } \ No newline at end of file