Refactor admin settings, add all service settings

This commit is contained in:
Râu Cao
2023-03-15 11:40:47 +07:00
committed by Gitea
parent 295d486761
commit ca1221e9f3
18 changed files with 296 additions and 58 deletions

View File

@@ -0,0 +1,13 @@
<%= tag.public_send(@tag, class: "mb-6 last:mb-0") do %>
<label class="block">
<p class="font-bold <%= @descripton.present? ? "mb-1" : "mb-2" %>">
<%= @title %>
</p>
<% if @descripton.present? %>
<p class="text-gray-500">
<%= @descripton %>
</p>
<% end %>
<%= content %>
</label>
<% end %>

View File

@@ -0,0 +1,11 @@
# frozen_string_literal: true
module FormElements
class FieldsetComponent < ViewComponent::Base
def initialize(tag: "div", title:, description: nil)
@tag = tag
@title = title
@descripton = description
end
end
end