The personal finance app for everyone (by everyone)
Ruby
<%= turbo_frame_tag "modal" do %>
<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<% if @error_message.present? %>
<div class="mb-4 p-3 rounded-md bg-destructive/10 text-destructive text-sm">
<%= @error_message %>
</div>
<% end %>
<%= styled_form_with model: @simplefin_item, url: simplefin_items_path, method: :post, data: { turbo: true, turbo_frame: "_top" } do |f| %>
<div class="space-y-3">
<div>
<%= f.label :setup_token, t(".setup_token"), class: "text-sm text-secondary block mb-1" %>
<%= f.text_field :setup_token, class: "input", placeholder: t(".setup_token_placeholder") %>
</div>
<div class="flex items-center gap-2 justify-end pt-2">
<%= render DS::Link.new(
text: t(".cancel"),
href: accounts_path,
variant: :secondary,
data: { turbo_frame: "_top", action: "DS--dialog#close" }
) %>
<%= render DS::Button.new(text: t(".connect"), type: :submit) %>
</div>
</div>
<% end %>
<% end %>
<% end %>
<% end %>