Sha256: de0da857f393d9c8b2129f870906bd8f10063dcc93add9700fbc4bb535ea1cd9
Contents?: true
Size: 640 Bytes
Versions: 13
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true # @param type [String] Classic notification type `error`, `alert` and `info` + custom `success` # @param data [String, Hash] `String` for backward compatibility, # `Hash` for the new functionality `{title: '', body: '', timeout: 5, countdown: false, action: { url: '', method: '', name: ''}}`. # The `title` attribute for `Hash` is mandatory. module Signum module NotificationBody class Component < ViewComponent::Base attr_reader :signal, :data def initialize(signal, data) @signal = signal @data = data.nil? ? {} : data.deep_symbolize_keys end end end end
Version data entries
13 entries across 13 versions & 1 rubygems