A spreadsheet view_component for your Rails app
Add this line to your application's Gemfile:
gem 'spreadsheet', github: 'magma-labs/spreadsheet'
And then execute:
Or install it yourself as:
$ gem install spreadsheet
Then run the installation task
$ rake spreadsheet:install
After install you can use Spreadsheet's ViewComponents in your templates
= render Spreadsheet::Cell.new(id: 'cell-id', value: 'A Spreadsheet Cell')
Most components accept the following options:
classnames: For agregate css classes to use with your component
colspan: For define colspan to be applied in a component
component_controller: For use a custom stimulus controller with a component
extra_data: For extend default dataset added in the component template
Setup project locally
In brief, the process is 2 steps:
yarn linkin this directory.
yarn link "spreadsheet"in the project that has the dependency.
Bug reports and pull requests are welcome on GitHub at https://github.com/magma-labs/spreadsheet.
The gem is available as open source under the terms of the MIT License.