Sha256: b12d30770faa9ef2b69968807fe8f4372cfd671a891f490f9071e964f3aa735c
Contents?: true
Size: 540 Bytes
Versions: 25
Compression:
Stored size: 540 Bytes
Contents
module Coco module ModalHelper def coco_modal_frame_id(name = "default") "coco-modal-frame-#{name.to_s.dasherize}" end def coco_modal_data_attributes(name = "default") return {} if name.nil? { turbo: true, turbo_frame: coco_modal_frame_id(name) } end # Deprecated, do not use def coco_link_to_modal(*, data: {}, modal: nil, **kwargs, &) kwargs[:data] = coco_modal_data_attributes(modal || "default").merge(data) coco_link_to(*, **kwargs, &) end end end
Version data entries
25 entries across 25 versions & 1 rubygems