Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split effects from variants, mixed examples, new shine and shine hover effect. #12

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

brunos3d
Copy link
Contributor

Rename the Icon prop to icon (lower case, keep prop name convention).
Move all effects from variants to effect.
Refactored ButtonExample container to dynamically generate button code based on props.
Add a new section with mixed examples (variants + effects)
Updated the docs.

Preview deployment here
https://enhanced-button2.vercel.app/

PS: It partially closes this issue: #11
For a wide composition between effects it would require separated props on cva for each effect.

[Copilot PR Explanation]
This pull request includes significant updates to the button.tsx component, improvements to the README.md file, and changes to the package.json and src/app/page.tsx files to enhance the functionality and documentation of the button components. The most important changes include the addition of new button effects, updates to the Tailwind CSS configuration, and improvements to the documentation and examples.

Enhancements to Button Component:

  • Added new button effects such as expandIcon, ringHover, shineHover, gooeyRight, gooeyLeft, underline, and hoverUnderline to the button.tsx component.
  • Updated the buttonVariants to include new styles and effects for better customization and visual enhancements.
  • Refactored the Button component to use effect instead of variant for certain visual effects and improved the handling of icons within buttons.

Documentation Improvements:

  • Updated the README.md file to provide clearer instructions and examples for using the new button effects and variants. This includes changes to the example usage and the addition of a section for mixing different button variants.
  • Improved the formatting and readability of the README.md file by using consistent markdown styling and code formatting.

Configuration and Dependency Updates:

  • Updated the tailwind-merge dependency in package.json to version ^2.5.5 to ensure compatibility with the latest Tailwind CSS features.
  • Modified the tailwind.config.ts to include new keyframes and animations for the shine effect, enhancing the visual appeal of the buttons.

Page Component Enhancements:

  • Refactored the src/app/page.tsx file to improve the display and examples of the button components, including the addition of new button examples and the removal of redundant code. [1] [2] [3] [4]
  • Added a workaround to ensure icon names are displayed correctly in the code blocks.

These changes collectively enhance the functionality, customization, and documentation of the button components, making it easier for developers to implement and utilize them in their projects.

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
enhanced-button ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 3:30pm

@jakobhoeg jakobhoeg merged commit 16d6d7a into jakobhoeg:master Dec 12, 2024
2 checks passed
@jakobhoeg
Copy link
Owner

Hi @brunos3d,

Thank you for all the neat improvements, they're very much appreciated!

@jakobhoeg jakobhoeg linked an issue Dec 12, 2024 that may be closed by this pull request
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.

Request: Combination among variants
2 participants