Module: Playbook::ApplicationHelper
- Includes:
- Webpacker::Helper, Webpacker::React::Helpers
- Defined in:
- app/helpers/playbook/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_webpacker_instance ⇒ Object
13 14 15 |
# File 'app/helpers/playbook/application_helper.rb', line 13 def current_webpacker_instance Playbook.webpacker end |
#dark_mode ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/helpers/playbook/application_helper.rb', line 17 def dark_mode if [:dark_mode] == "true" true else false end end |
#dark_mode_props(props) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/helpers/playbook/application_helper.rb', line 25 def dark_mode_props(props) if [:dark_mode] == "true" props.merge(dark: dark_mode) elsif [:dark_mode] == "false" props.merge(dark: dark_mode) else props end end |