Class: ActiveMail::Components::Button
- Extended by:
- T::Sig
- Defined in:
- lib/activemail/components/button.rb
Constant Summary
Constants inherited from Base
ActiveMail::Components::Base::BUTTON_PADDING, ActiveMail::Components::Base::IGNORED_ON_PASSTHROUGH, ActiveMail::Components::Base::TABLE_RESET
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ActiveMail::Components::Base
Instance Method Details
#transform(node, inner) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/activemail/components/button.rb', line 12 def transform(node, inner) = class?(node, 'expand') inner = anchor(node, inner, ) if node.attr('href') inner = "<center>#{inner}</center>" if = ? '<td class="expander"></td>' : '' # CSS-driven by design: colors come from .button rules, not inline tokens — # a distinct robustness model from <cta>, which inlines its palette. ( outer_classes: combine_classes(node, 'button'), inner: inner, outer_extra: ) end |