Merged
Conversation
Moar colors!
Contributor
There was a problem hiding this comment.
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.
RasmusDWN
approved these changes
Aug 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the missing button styles
Closes #27