Class: EmojiComponent

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

Overview

Emoji — renders a Fomantic-UI emoji by name.

Usage:

Emoji(name: "smile")
Emoji(name: "thumbsup")

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/emoji_component.rb', line 12

def to_s
  tag.em(class: "small", data: { emoji: ":#{name}:" })
end