# # Personal Level Icon # # Show an icon for each thread to indicate whether you're the only recipient, # one of many recipients, or a member of a mailing list. # Access core components by requiring `nylas-exports`. {Utils, DraftStore, React} = require 'nylas-exports' # Access N1 React components by requiring `nylas-component-kit`. {RetinaImg} = require 'nylas-component-kit' class PersonalLevelIcon extends React.Component # Note: You should assign a new displayName to avoid naming # conflicts when injecting your item @displayName: 'PersonalLevelIcon' # In the constructor, we're setting the component's initial state. constructor: (@props) -> @state = level: @_calculateLevel(@props.thread) # React components' `render` methods return a virtual DOM element to render. # The returned DOM fragment is a result of the component's `state` and # `props`. In that sense, `render` methods are deterministic. render: =>