Class: FoxTail::AvatarComponent
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Instance Method Details
#border ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'app/components/fox_tail/avatar_component.rb', line 17
def border
if options[:border].is_a?(TrueClass)
:default
elsif !options[:border]
:none
else
options[:border].to_sym
end
end
|
#border? ⇒ Boolean
27
28
29
|
# File 'app/components/fox_tail/avatar_component.rb', line 27
def border?
border != :none
end
|
#call ⇒ Object
31
32
33
34
35
36
37
38
39
40
|
# File 'app/components/fox_tail/avatar_component.rb', line 31
def call
if dot?
content_tag :div, class: theme.apply("dot/container", self) do
concat dot
concat render_visual
end
else
render_visual
end
end
|