Skip to content

Commit

Permalink
Tweak button padding
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Oct 5, 2023
1 parent c2d3e9c commit e0e6099
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/components/tailwind/button_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(tag:, size:, type:, href: nil, icon: nil, open_in_new_tab: false)
when "lg"
classes += %w[px-4 py-2 text-lg]
when "2xl"
classes += %w[px-11 sm:px-16 py-3 sm:py-4 text-2xl]
classes += %w[px-10 py-3 sm:py-4 text-2xl]
else
raise "Unexpected size #{size}"
end
Expand Down
2 changes: 1 addition & 1 deletion spec/components/tailwind/button_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

it "renders an extra large button" do
render_inline(described_class.new(tag: :button, size: "2xl", type: :primary)) { "Hello world!" }
expect(page).to have_button(class: %w[px-11 sm:px-16 py-3 sm:py-4 text-2xl])
expect(page).to have_button(class: %w[px-10 py-3 sm:py-4 text-2xl])
end

it "renders a primary button in white on green" do
Expand Down

0 comments on commit e0e6099

Please sign in to comment.