Sha256: 783d8807486825919bf38c95121a8a90b82e50742c7458c3a8d02c2b5bb2bb66
Contents?: true
Size: 715 Bytes
Versions: 65
Compression:
Stored size: 715 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 cookies[:dark_mode] == "true" true else false end end def dark_mode_props(props) if cookies[:dark_mode] == "true" props.merge(dark: dark_mode) elsif cookies[:dark_mode] == "false" props.merge(dark: dark_mode) else props end end end end
Version data entries
65 entries across 65 versions & 1 rubygems