Start making some helpers for redundant visual elements (widgets)
This commit is contained in:
parent
780eb5c51d
commit
8b414e096c
5 changed files with 54 additions and 94 deletions
8
app/helpers/widgets_helper.rb
Normal file
8
app/helpers/widgets_helper.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
module WidgetsHelper
|
||||
# DRY up rendering of visual elements
|
||||
|
||||
# https://getbootstrap.com/docs/3.3/components/#labels
|
||||
def bootstrap_label(value, variant, options = {})
|
||||
content_tag('span', value, class: "label label-#{variant}", **options)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue