Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/flowbite/button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Flowbite
class Button < ViewComponent::Base
SIZES = {
xs: ["text-xs", "px-3", "py-2"],
sm: ["text-sm", "px-3", "py-1.5"],
sm: ["text-sm", "px-3", "py-2"],
default: ["text-sm", "px-5", "py-2.5"],
lg: ["text-base", "px-5", "py-3"],
xl: ["text-base", "px-6", "py-3.5"]
Expand Down
28 changes: 28 additions & 0 deletions demo/test/components/previews/button_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,34 @@ def alternative

# @!endgroup

# @!group Sizes
#
# Use these examples if you want to use smaller or larger buttons.
#
# @display classes flex flex-wrap

def xs_button
render(Flowbite::Button.new(label: "Extra small", size: :xs))
end

def sm_button
render(Flowbite::Button.new(label: "Small", size: :sm))
end

def default_button
render(Flowbite::Button.new(label: "Default", size: :default))
end

def lg_button
render(Flowbite::Button.new(label: "Large", size: :lg))
end

def xl_button
render(Flowbite::Button.new(label: "Extra large", size: :xl))
end

# @!endgroup

# @!group Pills
#
# The button pills can be used as an alternative style by using fully rounded edges.
Expand Down