Files
fizzy/app/views/comments/_new.html.erb
T
2024-09-05 17:36:51 -04:00

20 lines
1.0 KiB
Plaintext

<div class="comment flex align-start gap fill-shade border-radius full-width comment--mine">
<span class="avatar fill-black txt-reversed flex-item-no-shrink"><strong><%= Current.user.initials %></strong></span>
<div class="flex flex-column full-width gap-half">
<div class="comment__author flex align-center gap-half">
<strong><%= Current.user.name %></strong>
</div>
<div class="comment__body txt-align-start">
<%= form_with model: Comment.new, url: bubble_comments_path(@bubble), class: "flex flex-column gap full-width" do | form | %>
<%= form.text_area :body, class: "input", required: true, rows: 4,
placeholder: (@bubble.comments.empty? && @bubble.creator == Current.user) ? "Add some notes…" : "Type your comment…" %>
<%= form.button class: "btn btn--reversed center" do %>
<%= image_tag "check.svg", aria: { hidden: "true" }, size: 24 %>
<span class="for-screen-reader">Save</span>
<% end %>
<% end %>
</div>
</div>
</div>