Class: Playbook::PbCurrency::Currency
- Defined in:
- app/pb_kits/playbook/pb_currency/currency.rb
Instance Method Summary collapse
- #body_props ⇒ Object
- #classname ⇒ Object
- #currency_wrapper_props ⇒ Object
- #emphasized_class ⇒ Object
- #title_props ⇒ Object
- #variant_class ⇒ Object
Methods inherited from KitBase
Methods included from Cursor
#cursor_options, #cursor_props, #cursor_values, included
Methods included from Display
#display_options, #display_props, #display_values, included
Methods included from LineHeight
included, #line_height_options, #line_height_props, #line_height_values
Methods included from Shadow
included, #shadow_options, #shadow_props, #shadow_values
Methods included from NumberSpacing
Methods included from ZIndex
Methods included from Spacing
included, #max_width_options, #max_width_props, #max_width_values, #spacing_options, #spacing_props, #spacing_values
Methods included from Classnames
#generate_classname, #generate_classname_without_spacing, included
Methods included from Playbook::Props
Methods included from Playbook::PbKitHelper
Methods included from Playbook::PbFormsHelper
Instance Method Details
#body_props ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 57 def body_props { text: units_element, color: "light", classname: "unit", dark: dark, } end |
#classname ⇒ Object
36 37 38 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 36 def classname generate_classname("pb_currency_kit", align, size, dark_class) end |
#currency_wrapper_props ⇒ Object
40 41 42 43 44 45 46 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 40 def currency_wrapper_props { classname: "dollar_sign", color: "light", dark: dark, } end |
#emphasized_class ⇒ Object
66 67 68 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 66 def emphasized_class emphasized ? "" : "_deemphasized" end |
#title_props ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 48 def title_props { size: size_value, text: whole_value, classname: "pb_currency_value", dark: dark, } end |
#variant_class ⇒ Object
70 71 72 73 74 75 76 77 78 79 |
# File 'app/pb_kits/playbook/pb_currency/currency.rb', line 70 def variant_class return unless size == "sm" case variant when "light" "_light" when "bold" "_bold" end end |