Start making some helpers for redundant visual elements (widgets)

This commit is contained in:
James Mason 2018-03-20 11:19:17 -07:00
parent 780eb5c51d
commit 8b414e096c
No known key found for this signature in database
GPG key ID: 1B3951886C449023
5 changed files with 54 additions and 94 deletions

View 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