rx/presenters

View on GitHub
views/mdc/components/typography.erb

Summary

Maintainability
Test Coverage
<% class_name = '' unless local_variables.include? :class_name
   position_classes = comp.position.map {|p| "v-typography-position-#{p}"}.join(' ')
%>
<div id="<%= comp.id %>"
     class="v-typography mdc-typography--<%= "#{type}#{comp.level}" %>
           <%= class_name %>
           <%= position_classes %>
           <%= 'v-actionable' if comp.events %>"
     style = "<%= "color: #{comp.color};" if comp.color %>
              <%= "display: inline;" if comp.inline %>"
     <%= erb :"components/event", :locals => {comp: comp, events: comp.events, parent_id: comp.event_parent_id} %>>
  <%= erb :"components/icon", :locals => {comp: comp.icon} if comp.icon %>
  <%= expand_text(comp.text, markdown: comp.markdown) %>
</div>
<%= erb :"components/tooltip", :locals => {comp: comp.tooltip, parent_id: comp.id} %>