Sha256: 7017f976345badea66c59efdceb18c9b52db0f92f29f7aa5d2354659f18bc51c

Contents?: true

Size: 1.38 KB

Versions: 9

Compression:

Stored size: 1.38 KB

Contents

<% class_name = '' unless local_variables.include? :class_name
   data = nil unless local_variables.include? :data
%>
<% 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) %>"
      <%= "data-#{data}" if data %>
       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

9 entries across 9 versions & 1 rubygems

Version Path
voom-presenters-0.2.0 views/mdc/components/icon.erb
voom-presenters-0.1.13 views/mdc/components/icon.erb
voom-presenters-0.1.12 views/mdc/components/icon.erb
voom-presenters-0.1.11 views/mdc/components/icon.erb
voom-presenters-0.1.10 views/mdc/components/icon.erb
voom-presenters-0.1.9 views/mdc/components/icon.erb
voom-presenters-0.1.8 views/mdc/components/icon.erb
voom-presenters-0.1.7 views/mdc/components/icon.erb
voom-presenters-0.1.6 views/mdc/components/icon.erb