Skip to content

Commit

Permalink
chore: Change h3 to p to fix semantics in empty state component (#285)
Browse files Browse the repository at this point in the history
* chore: Change h3 to p to fix semantics

* chore: Fixed broken test
  • Loading branch information
joshsadam authored Oct 30, 2023
1 parent 5103ac3 commit 68b9e2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/components/viral/empty_state_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div class="flex items-center inline-block">
<%= viral_icon(name: icon_name, color: :primary, classes: "w-20 h-20 shrink mr-4") %>
<div class="flex flex-col grow">
<h3 class="text-2xl font-bold dark:text-slate-300 text-slate-700">
<p class="text-2xl font-bold dark:text-slate-300 text-slate-700">
<%= title %>
</h3>
</p>
<% if description.present? %>
<p class="text-slate-600 dark:text-slate-400">
<%= description %>
Expand Down
2 changes: 1 addition & 1 deletion test/components/viral/empty_component_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class EmptyComponentTest < ViewComponentTestCase
test 'default' do
render_preview(:default)
assert_selector 'span.Viral-Icon svg'
assert_selector 'h3', text: I18n.t(:'groups.show.shared_projects.no_shared.title')
assert_selector 'p', text: I18n.t(:'groups.show.shared_projects.no_shared.title')
assert_selector 'p', text: I18n.t(:'groups.show.shared_projects.no_shared.description')
end
end
Expand Down

0 comments on commit 68b9e2c

Please sign in to comment.