Sha256: a22295e8b8f1c70d2f4867573a4a2fa02bef275a755e4605cb42d14daaa9d51b
Contents?: true
Size: 710 Bytes
Versions: 5
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true require "webpacker" require "webpacker/react/railtie" if defined?(Rails) require "webpacker/react/helpers" require "webpacker/react/component" module Playbook module ApplicationHelper include ::Webpacker::Helper include ::Webpacker::React::Helpers def current_webpacker_instance Playbook.webpacker end def dark_mode if ENV["dark_mode"] == "true" true else false end end def dark_mode_props(props) if ENV["dark_mode"] == "true" props.merge(dark: dark_mode) elsif ENV["dark_mode"] == "false" props.merge(dark: dark_mode) else props end end end end
Version data entries
5 entries across 5 versions & 1 rubygems