<canvas class="border bg-light w-100" data-behavior="digital-signature" data-signature-input="[data-ujs-target=signature-input]" style="height: 150px"></canvas>

<% if local_assigns[:instruction] %>
  <small class="form-text text-muted">
    <%= instruction %>
  </small>
<% end %>

<%= form.hidden_field :signature_base64, data: { ujs_target: "signature-input" } %>
<div class="text-right">
  <%= button_tag class: "btn btn-sm btn-danger", data: { behavior: "clear-digital-signature" } do %>
    <%= fa_icon "refresh" %> <%= t "shared.clear" %>
  <% end %>
</div>

