Module: Iron::TransfersHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/iron/transfers_helper.rb
Instance Method Summary collapse
- #button_to_copy_to_clipboard(url, &block) ⇒ Object
- #qr_code_image(url) ⇒ Object
- #web_share_button(url, title, text, &block) ⇒ Object
Instance Method Details
#button_to_copy_to_clipboard(url, &block) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/helpers/iron/transfers_helper.rb', line 3 def (url, &block) tag. class: "button-secondary button-md sm:button-sm group max-sm:flex-1 max-sm:justify-center", data: { controller: "copy-to-clipboard", action: "copy-to-clipboard#copy", copy_to_clipboard_content_value: url, copy_to_clipboard_success_class: "success" }, &block end |
#qr_code_image(url) ⇒ Object
22 23 24 25 |
# File 'app/helpers/iron/transfers_helper.rb', line 22 def qr_code_image(url) qr_code_link = QrCodeLink.new(url) image_tag qr_code_path(qr_code_link.signed), class: "aspect-square", alt: "QR Code" end |
#web_share_button(url, title, text, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/iron/transfers_helper.rb', line 12 def (url, title, text, &block) tag. class: "button-secondary button-md sm:button-sm max-sm:flex-1 max-sm:justify-center", hidden: true, data: { controller: "web-share", action: "web-share#share", web_share_url_value: url, web_share_text_value: text, web_share_title_value: title }, &block end |