Class: Playbook::PbCard::Card

Inherits:
KitBase
  • Object
show all
Defined in:
app/pb_kits/playbook/pb_card/card.rb

Instance Method Summary collapse

Methods inherited from KitBase

#object

Methods included from Order

included, #order_options, #order_props, #order_values

Methods included from FlexShrink

#flex_shrink_options, #flex_shrink_props, #flex_shrink_values, included

Methods included from FlexGrow

#flex_grow_options, #flex_grow_props, #flex_grow_values, included

Methods included from Flex

#flex_options, #flex_props, #flex_values, included

Methods included from AlignSelf

#align_self_options, #align_self_props, #align_self_values, included

Methods included from AlignContent

#align_content_options, #align_content_props, #align_content_values, included

Methods included from AlignItems

#align_items_options, #align_items_props, #align_items_values, included

Methods included from JustifySelf

included, #justify_self_options, #justify_self_props, #justify_self_values

Methods included from JustifyContent

included, #justify_content_options, #justify_content_props, #justify_content_values

Methods included from FlexWrap

#flex_wrap_options, #flex_wrap_props, #flex_wrap_values, included

Methods included from FlexDirection

#flex_direction_options, #flex_direction_props, #flex_direction_values, included

Methods included from Cursor

#cursor_options, #cursor_props, #cursor_values, included

Methods included from Display

#display_options, #display_props, #display_size_values, #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

included

Methods included from ZIndex

included

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

#initialize, #prop

Methods included from Playbook::PbKitHelper

#pb_rails

Methods included from Playbook::PbFormsHelper

#pb_form_with

Instance Method Details

#body_align_contentObject



79
80
81
82
83
84
85
# File 'app/pb_kits/playbook/pb_card/card.rb', line 79

def body_align_content
  if align_content.present?
    "align_content_#{align_content}"
  else
    ""
  end
end

#body_align_itemsObject



71
72
73
74
75
76
77
# File 'app/pb_kits/playbook/pb_card/card.rb', line 71

def body_align_items
  if align_items.present?
    "align_items_#{align_items}"
  else
    ""
  end
end

#body_align_selfObject



87
88
89
90
91
92
93
# File 'app/pb_kits/playbook/pb_card/card.rb', line 87

def body_align_self
  if align_self.present?
    "align_self_#{align_self}"
  else
    ""
  end
end

#body_flexObject



95
96
97
98
99
100
101
# File 'app/pb_kits/playbook/pb_card/card.rb', line 95

def body_flex
  if flex.present?
    "flex_#{flex}"
  else
    ""
  end
end

#body_flex_directionObject



39
40
41
42
43
44
45
# File 'app/pb_kits/playbook/pb_card/card.rb', line 39

def body_flex_direction
  if flex_direction.present?
    "flex_direction_#{flex_direction}"
  else
    ""
  end
end

#body_flex_growObject



103
104
105
106
107
108
109
# File 'app/pb_kits/playbook/pb_card/card.rb', line 103

def body_flex_grow
  if flex_grow.present?
    "flex_grow_#{flex_grow}"
  else
    ""
  end
end

#body_flex_shrinkObject



111
112
113
114
115
116
117
# File 'app/pb_kits/playbook/pb_card/card.rb', line 111

def body_flex_shrink
  if flex_shrink.present?
    "flex_shrink_#{flex_shrink}"
  else
    ""
  end
end

#body_flex_wrapObject



47
48
49
50
51
52
53
# File 'app/pb_kits/playbook/pb_card/card.rb', line 47

def body_flex_wrap
  if flex_wrap.present?
    "flex_wrap_#{flex_wrap}"
  else
    ""
  end
end

#body_justify_contentObject



55
56
57
58
59
60
61
# File 'app/pb_kits/playbook/pb_card/card.rb', line 55

def body_justify_content
  if justify_content.present?
    "justify_content_#{justify_content}"
  else
    ""
  end
end

#body_justify_selfObject



63
64
65
66
67
68
69
# File 'app/pb_kits/playbook/pb_card/card.rb', line 63

def body_justify_self
  if justify_self.present?
    "justify_self_#{justify_self}"
  else
    ""
  end
end

#body_orderObject



119
120
121
122
123
124
125
# File 'app/pb_kits/playbook/pb_card/card.rb', line 119

def body_order
  if order.present?
    "order_#{order}"
  else
    ""
  end
end

#body_paddingObject



31
32
33
34
35
36
37
# File 'app/pb_kits/playbook/pb_card/card.rb', line 31

def body_padding
  if padding.present?
    ""
  else
    "p_md"
  end
end

#classnameObject



21
22
23
24
25
26
27
28
29
# File 'app/pb_kits/playbook/pb_card/card.rb', line 21

def classname
  generate_classname("pb_card_kit",
                     selected_class,
                     border_class,
                     border_radius_class,
                     background_class,
                     highlight_position_class,
                     highlight_color_class)
end