File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
demo/test/components/previews Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module Flowbite
1212 class Button < ViewComponent ::Base
1313 SIZES = {
1414 xs : [ "text-xs" , "px-3" , "py-2" ] ,
15- sm : [ "text-sm" , "px-3" , "py-1.5 " ] ,
15+ sm : [ "text-sm" , "px-3" , "py-2 " ] ,
1616 default : [ "text-sm" , "px-5" , "py-2.5" ] ,
1717 lg : [ "text-base" , "px-5" , "py-3" ] ,
1818 xl : [ "text-base" , "px-6" , "py-3.5" ]
Original file line number Diff line number Diff line change @@ -42,6 +42,34 @@ def purple
4242
4343 # @!endgroup
4444
45+ # @!group Sizes
46+ #
47+ # Use these examples if you want to use smaller or larger buttons.
48+ #
49+ # @display classes flex flex-wrap
50+
51+ def xs_button
52+ render ( Flowbite ::Button . new ( label : "Extra small" , size : :xs ) )
53+ end
54+
55+ def sm_button
56+ render ( Flowbite ::Button . new ( label : "Small" , size : :sm ) )
57+ end
58+
59+ def default_button
60+ render ( Flowbite ::Button . new ( label : "Default" , size : :default ) )
61+ end
62+
63+ def lg_button
64+ render ( Flowbite ::Button . new ( label : "Large" , size : :lg ) )
65+ end
66+
67+ def xl_button
68+ render ( Flowbite ::Button . new ( label : "Extra large" , size : :xl ) )
69+ end
70+
71+ # @!endgroup
72+
4573 # @!group Pills
4674 #
4775 # The button pills can be used as an alternative style by using fully rounded edges.
You can’t perform that action at this time.
0 commit comments