Skip to content

Commit

Permalink
Keep default styling to error
Browse files Browse the repository at this point in the history
  • Loading branch information
gwwar committed Nov 15, 2023
1 parent 84bd2c3 commit 6ceff6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/components/primer/alpha/text_field.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
flex-direction: row;
align-items: flex-start;
gap: var(--base-size-4);
color: var(--control-borderColor-danger);
fill: var(--control-borderColor-danger);

& p {
margin-bottom: 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/primer/forms/validation_message.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= content_tag(:div, **@input.validation_arguments) do %>
<span class="FormControl-inlineValidation--visual" data-target="<%= @input.validation_success_icon_target %>" hidden><%= render(Primer::Beta::Octicon.new(icon: :"check-circle-fill", size: :xsmall, aria: { hidden: true })) %></span>
<span class=" FormControl-inlineValidation--visual" data-target="<%= @input.validation_error_icon_target %>" hidden><%= render(Primer::Beta::Octicon.new(icon: :"alert-fill", size: :xsmall, aria: { hidden: true })) %></span>
<span class=" FormControl-inlineValidation--visual" data-target="<%= @input.validation_error_icon_target %>"><%= render(Primer::Beta::Octicon.new(icon: :"alert-fill", size: :xsmall, aria: { hidden: true })) %></span>
<%= content_tag(:span, @input.invalid? ? @input.validation_messages.first : "", **@input.validation_message_arguments) %>
<% end %>

0 comments on commit 6ceff6d

Please sign in to comment.