Sha256: 69e54fb23722354f3bee6e6202d18a8242d0bc4de124f1d7324d56136a92f48f

Contents?: true

Size: 1.3 KB

Versions: 6

Compression:

Stored size: 1.3 KB

Contents

<% class_name = '' unless local_variables.include? :class_name
%>
<% if comp
     parent_id = comp.event_parent_id unless locals.include? :parent_id
     icon_name = comp.icon unless locals.include? :icon_name
     events = comp.events unless locals.include? :events
     position = comp.position||[] unless locals.include? :position
     position_classes = position.map {|p| "v-icon-position-#{p}"}.join(' ')
     class_name= "#{class_name} #{position_classes}"
     if icon_name =~ /^(fa[srlb]\s)*fa-/
       icon_class_name = "#{icon_name} v-icon__fa"
       icon_class_name = "fas #{icon_class_name}" unless icon_class_name=~ /^(fas)|(fal)|(fab)/
       icon = ''
     else
       icon_class_name = "material-icons"
       icon = icon_name
     end
%>
  <i id="<%= comp.id %>"
     class="<%= class_name %> <%= icon_class_name %>
            <%= 'v-actionable' if comp.events %>
            <%= color_classname(comp) %>"
       style = "<%= color_style(comp) %>
                <%= "font-size: #{comp.size}" if comp.size %>"
     <%= 'tabindex="1"' if class_name.include?('mdc-text-field__icon') && comp.events %>
       <%= erb :"components/event", :locals => {events: events, parent_id: parent_id} %>>
    <%= icon %>
  </i>
  <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-0.1.5 views/mdc/components/icon.erb
voom-presenters-0.1.4 views/mdc/components/icon.erb
voom-presenters-0.1.3 views/mdc/components/icon.erb
voom-presenters-0.1.2 views/mdc/components/icon.erb
voom-presenters-0.1.1 views/mdc/components/icon.erb
voom-presenters-0.1.0 views/mdc/components/icon.erb