Sha256: a7e9f2439758fe4ac4def3fe9486a02ab3656d4afae88f8bd4e85014ed02027f

Contents?: true

Size: 1.51 KB

Versions: 6

Compression:

Stored size: 1.51 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
     size_class = "v-icon-size-#{comp.size}" unless locals.include? :size_class
%>
  <i id="<%= comp.id %>"
     class="<%= class_name %> <%= icon_class_name %> <%= size_class %>
            <%= 'v-hidden' if comp.respond_to?(:hidden) && comp.hidden %>
            <%= 'v-actionable' if comp.events %>
            <%= color_classname(comp) %>"
      <%= "data-#{data}" if data %>
      style="<%= color_style(comp) %>"
      <%= 'tabindex="0"' if comp.events %>
      <%= erb :"components/event", :locals => {comp: comp, events: events, parent_id: parent_id} %>>
    <%= icon %>
  </i>
  <%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>
  <%= expand_text(comp.text) if comp.respond_to?(:text) %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 views/mdc/components/icon.erb
voom-presenters-2.1.0 views/mdc/components/icon.erb
voom-presenters-2.0.3 views/mdc/components/icon.erb
voom-presenters-2.0.2 views/mdc/components/icon.erb
voom-presenters-2.0.1 views/mdc/components/icon.erb
voom-presenters-2.0.0 views/mdc/components/icon.erb