1
0
postdoc/app/components/email_list_entry_component.rb

12 lines
221 B
Ruby
Raw Permalink Normal View History

2020-12-06 20:49:03 +01:00
class EmailListEntryComponent < ViewComponent::Base
attr_reader :email
def initialize(email:)
@email = email
end
def email_modifier_class
return 'email--read' if email.read?
'email--unread'
end
end