Skip to content

Comments

feat(button): add props and active styling for action buttons, integrate conditional for action vs navigation buttons#23

Merged
magali-la merged 2 commits intomainfrom
feat/button-component
Nov 8, 2025
Merged

feat(button): add props and active styling for action buttons, integrate conditional for action vs navigation buttons#23
magali-la merged 2 commits intomainfrom
feat/button-component

Conversation

@magali-la
Copy link
Collaborator

🎯Type of Change:

  • Feat ✨: New feature or functionality.

This PR...

  • Integrates onClick and isActive props for buttons that perform actions
  • Creates new active class in App.css for buttons
  • Includes handleClick conditional logic for action buttons vs navigation buttons
  • Integrates useNavigate and includes to prop for navigation buttons

📝 What I Did:

  • Determined props needed for action vs. navigation button functionality
  • Created an active class in App.css to conditionally render when isActive prop is activated
  • Overrode default gray hovers on buttons with active class to keep persistent blue color
  • Included handleClick conditional logic for pure navigation buttons vs. buttons that trigger actions
  • Tested props and logic in Onboarding.jsx's future features

🧪 How to Test:

  1. Run git checkout feat/button-component
  2. Run git pull origin feat/button-component
  3. Run npm run dev
  4. Add to="/path" prop to a button and verify it is navigating
  5. Verify that action buttons that already have onClick props still function as intended
  6. Verify Poppins font is showing in buttons in PR preview
  7. Note: this PR lays foundation for some future functionality, active class to be tested on user selection buttons

🤔 What I learned:

Learned to minimize prop overload. Learned method to conditionally activate specific styling beyond new variants in Tailwind Variants.

@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for mint-chip ready!

Name Link
🔨 Latest commit a20b884
🔍 Latest deploy log https://app.netlify.com/projects/mint-chip/deploys/690f86c96056e60008512ba0
😎 Deploy Preview https://deploy-preview-23--mint-chip.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CMolinaBetancourt
Copy link
Collaborator

It works perfectly! Ready for merging

@magali-la magali-la force-pushed the feat/button-component branch from 423db22 to a20b884 Compare November 8, 2025 18:07
@magali-la magali-la merged commit 7efc05a into main Nov 8, 2025
4 checks passed
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.

3 participants