Files
fizzy/app/views/comments/reactions/new.html.erb
T
Jason Zimdars 5beb851904 Whitespace
2025-02-19 11:23:14 -06:00

25 lines
1.5 KiB
Plaintext

<%= turbo_frame_tag dom_id(@comment, :new_reaction) do %>
<%= form_with url: bucket_bubble_comment_reactions_path(@comment.bubble.bucket, @comment.bubble, @comment),
class: "reaction reaction__form flex-inline postion--relative max-width align-center fill-white gap expanded",
data: { controller: "form", turbo_frame: dom_id(@comment, :reacting), action: "keydown.esc->form#cancel" } do |form| %>
<label class="reaction__form-label flex gap" style="--column-gap: 0.7ch;" role="button" tabindex="0" aria-label="Add a reaction">
<figure class="reaction__avatar margin-none flex-item-no-shrink">
<%= avatar_tag Current.user %>
<span class="for-screen-reader"><%= Current.user.name %></span>
</figure>
<%= form.text_field :content, name: "reaction[content]", autofocus: true, autocomplete: "off", autocorrect: "off", maxlength: 16,
required: true, pattern: /\S+.*/, class: "input reaction__input txt-small" %>
</label>
<%= form.button class: "btn btn--reversed", type: "submit" do %>
<%= image_tag "check.svg", aria: { hidden: "true" } %>
<span class="for-screen-reader">Submit</span>
<% end %>
<%= link_to bucket_bubble_comment_reactions_path(@comment.bubble.bucket, @comment.bubble, @comment),
data: { turbo_frame: dom_id(@comment, :reactions), form_target: "cancel" }, class: "btn btn--negative" do %>
<%= image_tag "minus.svg", aria: { hidden: "true" } %>
<span class="for-screen-reader">Cancel</span>
<% end %>
<% end %>
<% end %>