Skip to content

Commit

Permalink
テキストフィールドコンポーネントを追加: カスタムクラスとプレースホルダーをサポート
Browse files Browse the repository at this point in the history
  • Loading branch information
atzzCokeK committed Jan 30, 2025
1 parent 3720615 commit bdf6252
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/views/components/_text_field.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% classes ||= "" %>
<% placeholder ||= "" %>
<% text_field_classes = [
"border border-[var(--textColor)] rounded-md px-4 py-2 text-[var(--textColor)] focus:outline-none focus:ring-2 focus:ring-blue-500",
classes
].join(" ") %>
<input type="text" class="<%= text_field_classes %>" placeholder="<%= placeholder %>" />

0 comments on commit bdf6252

Please sign in to comment.