Skip to content

Commit

Permalink
Add flex-grow to all input fields to allow them to grow to the max si…
Browse files Browse the repository at this point in the history
…ze of the parent
  • Loading branch information
afomera committed Jun 12, 2024
1 parent cc6cd36 commit 5ca3769
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/views/madmin/fields/decimal/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.number_field field.attribute_name, step: :any, class: "form-input" %>
<%= form.number_field field.attribute_name, step: :any, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/file/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.file_field field.attribute_name, class: "form-input" %>
<%= form.file_field field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/float/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.number_field field.attribute_name, step: :any, class: "form-input" %>
<%= form.number_field field.attribute_name, step: :any, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/integer/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.number_field field.attribute_name, class: "form-input" %>
<%= form.number_field field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/json/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.text_area field.attribute_name, class: "form-input" %>
<%= form.text_area field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/password/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.password_field field.attribute_name, class: "form-input" %>
<%= form.password_field field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/rich_text/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<div class="flex-1">
<%= form.rich_text_area field.attribute_name, class: "form-input block" %>
<%= form.rich_text_area field.attribute_name, class: "flex-grow form-input block" %>
</div>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/string/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.text_field field.attribute_name, class: "form-input" %>
<%= form.text_field field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion app/views/madmin/fields/text/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.text_area field.attribute_name, class: "form-input" %>
<%= form.text_area field.attribute_name, class: "flex-grow form-input" %>
2 changes: 1 addition & 1 deletion lib/generators/madmin/field/templates/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="block md:inline-block md:w-32 flex-shrink-0 text-gray-700">
<%= render "madmin/shared/label", form: form, field: field %>
</div>
<%= form.text_field field.attribute_name, class: "form-input" %>
<%= form.text_field field.attribute_name, class: "flex-grow form-input" %>
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<%= form.label field.attribute_name, class: "inline-block w-32 flex-shrink-0" %>
<%= form.text_field field.attribute_name, class: "form-input" %>
<%= form.text_field field.attribute_name, class: "flex-grow form-input" %>

0 comments on commit 5ca3769

Please sign in to comment.