Class: FlagComponent

Inherits:
Component show all
Defined in:
app/components/flag_component.rb

Overview

Flag — country flag icon.

Usage:

Flag(country: "us")
Flag(country: "fr")

Constant Summary

Constants inherited from Component

Component::HTML_OPTIONS

Instance Method Summary collapse

Methods inherited from Component

default, #initialize, #render_in, slot

Constructor Details

This class inherits a constructor from Component

Instance Method Details

#to_sObject



12
13
14
# File 'app/components/flag_component.rb', line 12

def to_s
  tag.i(class: "#{country} flag")
end