add view_components gem to start tperf testing locally

This commit is contained in:
Andrew Brown 2021-08-02 18:16:31 -07:00
parent 5b29f1bdcc
commit 280118c72e
4 changed files with 18 additions and 0 deletions

View File

@ -46,6 +46,9 @@ gem 'animate-rails'
gem 'webpacker'
gem 'react-rails'
# Non-JS frontend
gem "view_component", require: "view_component/engine"
# Form enhancements
gem 'redcarpet' #markdown formatting
gem 'acts_as_list' #sortables

View File

@ -1520,6 +1520,9 @@ GEM
unf_ext
unf_ext (0.0.7.7)
uniform_notifier (1.14.1)
view_component (2.36.0)
activesupport (>= 5.0.0, < 8.0)
method_source (~> 1.0)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.1.0)
@ -1609,6 +1612,7 @@ DEPENDENCIES
thredded!
tribute
uglifier (>= 1.3.0)
view_component
web-console
webpacker
word_count_analyzer

View File

@ -0,0 +1 @@
<div>Add Button template here</div>

View File

@ -0,0 +1,10 @@
# frozen_string_literal: true
class ButtonComponent < ViewComponent::Base
def initialize(text:, left_icon:, right_icon:)
@text = text
@left_icon = left_icon
@right_icon = right_icon
end
end