Sha256: 98aaa183fe200b77d61ebeebf181eb3476b0bf985d30849aff9ea78998dca841
Contents?: true
Size: 550 Bytes
Versions: 2
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true class FoxTail::ModalTriggerComponent < FoxTail::TriggerBaseComponent class StimulusController < FoxTail::StimulusController def modal_identifier FoxTail::ModalComponent.stimulus_controller_identifier end def attributes(options = {}) attributes = super options attributes[:data][outlet_key(self.modal_identifier)] = options[:selector] attributes[:data][:action] = action options.fetch(:action, :show), event: options.fetch(:trigger_type, :click) attributes end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fox_tail-0.1.1 | app/components/fox_tail/modal_trigger_component.rb |
fox_tail-0.1.0 | app/components/fox_tail/modal_trigger_component.rb |