Skip to content

coprl/theme_color_picker_presenter_plugin

Repository files navigation

Color picker Presenter Plugin

A COPRL presenter plugin that provides color picker functionality. Use Javascript library from material-design-inspired-color-picker

Installation

Add this line to your application's Gemfile:

gem 'theme_color_picker_presenter_plugin', git: 'https://github.com/coprl/theme_color_picker_presenter_plugin', require: false

And then execute:

$ bundle

Usage in POMs

Declare the plugin in your pom, plugin :theme_color_picker.

Coprl::Presenters.define(:my_pom) do
  plugin :theme_color_picker
  
  content do
    theme_color_picker(:name, value: '#BBFF11')
  end
end

Additional options and defaults

You can optionally add a preview hash that includes section and set vars. f.e.
 preview: { section: :primary_color_section, set_vars: %w(mdc-theme-primary mdc-theme-background)}

This will update the css vars in the defined section with the color returned by the picker 

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the COPRL project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published