Skip to content

Button styles#28

Merged
koppen merged 2 commits intomainfrom
button_styles
Aug 21, 2025
Merged

Button styles#28
koppen merged 2 commits intomainfrom
button_styles

Conversation

@koppen
Copy link
Copy Markdown
Member

@koppen koppen commented Aug 21, 2025

Add the missing button styles

CleanShot 2025-08-21 at 11 52 55

Closes #27

@koppen koppen requested a review from Copilot August 21, 2025 09:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds missing button styles to the Flowbite button component, expanding the available color options beyond the existing default and alternative styles. The changes provide six new button style variants: dark, light, green, red, yellow, and purple.

Key changes:

  • Added six new button style definitions with appropriate CSS classes for colors, hover states, and dark mode support
  • Created corresponding preview methods to demonstrate each new button style
  • Maintained consistency with existing button style patterns and Tailwind CSS classes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
app/components/flowbite/button.rb Adds six new button style definitions (dark, light, green, red, yellow, purple) with Tailwind CSS classes
demo/test/components/previews/button_preview.rb Adds preview methods for each new button style to demonstrate their appearance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

The purple button example at
https://flowbite.com/docs/components/buttons/#default-button does not
have an end margin, whereas the other buttons do, probably because it is
the last button of the group.

For consistencys sake, I've added the me-2 class to the purple button as
well, but the real question is, should the buttons come with margins at
all? The fact that me-2 was missing here seems to indicate that it is
not an innate part of the button, and the other buttons solely have the
margin classes because they need to look pretty in the documentation.
@koppen koppen requested review from RasmusDWN and olepalm August 21, 2025 10:13
@koppen koppen merged commit b2b3bfd into main Aug 21, 2025
5 checks passed
@koppen koppen deleted the button_styles branch August 21, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More styles for Buttons

3 participants