Skip to content

Commit

Permalink
Switch heading to display font in profile
Browse files Browse the repository at this point in the history
This is more consistent but differs from the design I think
  • Loading branch information
mlandauer committed Feb 8, 2024
1 parent 39c8115 commit ff75731
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/components/tailwind/heading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def initialize(tag:, size: nil, color: nil, extra_classes: "")
raise "Invalid tag" unless tag == :h1

size_class = case size
when "xl"
"text-xl"
when "3xl"
"text-3xl"
# 4xl is the default size for h1
Expand Down
2 changes: 1 addition & 1 deletion app/views/_tailwind/layouts/profile.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% content_for :content do %>
<%# TODO: This is using a different style than the standard Heading component %>
<h1 class="text-xl font-bold text-navy">Your account</h1>
<%= render Tailwind::Heading.new(tag: :h1, size: "xl").with_content("Your account") %>
<p class="mt-1 text-4xl font-bold text-navy font-display">
<%= current_user.name_with_fallback %>
</p>
Expand Down

0 comments on commit ff75731

Please sign in to comment.