app/components/coco/buttons/button/button.rb in coveragebook_components-0.18.0 vs app/components/coco/buttons/button/button.rb in coveragebook_components-0.18.7

- old
+ new

@@ -53,10 +53,11 @@ accepts_option :dropdown do |dd| dd.accepts_option :placement, from: %w[top top-start top-end right right-start right-end bottom bottom-start bottom-end left left-start left-end auto auto-start auto-end], private: true + dd.accepts_option :flip, from: [true, false], default: true, private: true end renders_one :text, Coco::Content renders_one :dropdown, types: { @@ -152,10 +153,10 @@ def alpine_wrapper_attrs if dropdown? || confirm? { data: x_data("buttonDropdown"), - dropdown: jsify_data({placement: get_option_value(:dropdown, :placement)}.compact), + dropdown: jsify_data({placement: get_option_value(:dropdown, :placement), flip: get_option_value(:dropdown, :flip)}.compact), bind: "root" } end end