@@ -121,11 +121,6 @@ defmodule LiveDebugger.Components do
121121 attr ( :chevron_class , :any , default: nil , doc: "CSS class for the chevron icon" )
122122 attr ( :open , :boolean , default: false , doc: "Whether the collapsible is open by default" )
123123
124- attr ( :chevron_only? , :boolean ,
125- default: false ,
126- doc: "Weather to make only chevron clickable to open/close the collapsible"
127- )
128-
129124 attr ( :icon , :string ,
130125 default: "icon-chevron-right" ,
131126 doc: "Icon for chevron. It will be rotated 90 degrees when the collapsible is open"
@@ -148,20 +143,10 @@ defmodule LiveDebugger.Components do
148143 >
149144 < summary
150145 id = { @ id <> "-summary" }
151- class = {
152- [
153- "block flex items-center" ,
154- if ( @ chevron_only? , do: "cursor-default" , else: "cursor-pointer" )
155- ] ++
156- List . wrap ( @ label_class )
157- }
158- { allow_only_chevron_to_collapse ( @ chevron_only? ) }
146+ class = { [ "block flex items-center cursor-pointer" | List . wrap ( @ label_class ) ] }
159147 { @ rest }
160148 >
161- < . icon
162- name = { @ icon }
163- class = { [ "chevron cursor-pointer rotate-icon shrink-0" | List . wrap ( @ chevron_class ) ] }
164- />
149+ < . icon name = { @ icon } class = { [ "rotate-icon shrink-0" | List . wrap ( @ chevron_class ) ] } />
165150 <%= render_slot ( @ label ) %>
166151 </ summary >
167152 <%= render_slot ( @ inner_block ) %>
@@ -265,12 +250,6 @@ defmodule LiveDebugger.Components do
265250 def show_collapsible_assign ( true ) , do: % { :"phx-hook" => "CollapsibleOpen" }
266251 def show_collapsible_assign ( _ ) , do: % { }
267252
268- @ doc """
269- Used to add CollapsibleChevronOnly hook to element based on condition.
270- """
271- def allow_only_chevron_to_collapse ( true ) , do: % { :"phx-hook" => "CollapsibleChevronOnly" }
272- def allow_only_chevron_to_collapse ( _ ) , do: % { }
273-
274253 @ doc """
275254 Typography component to render headings.
276255 """
0 commit comments