Skip to content

Conversation

@egdev6
Copy link
Owner

@egdev6 egdev6 commented Jul 24, 2025

This pull request refactors multiple components to improve code modularity and maintainability by extracting logic into reusable hooks. It also removes unused ripple effect styles and related code. The most important changes are grouped by theme below.

Refactoring Components with Hooks

  • Button Component: Extracted button logic into a new useButton hook, simplifying the Button component by moving state and utility functions to the hook (src/components/atoms/button/Button.tsx, src/components/atoms/button/useButton.ts) [1] [2].
  • Header Component: Refactored the Header component by moving logic into a useHeader hook, reducing the complexity of the component (src/components/atoms/header/Header.tsx, src/components/atoms/header/useHeader.ts) [1] [2].
  • IconButton Component: Moved logic from the IconButton component into a useIconButton hook, following the same pattern as other components (src/components/atoms/icon-button/IconButton.tsx, src/components/atoms/icon-button/useIconButton.ts) [1] [2].
  • Input Component: Refactored the Input component by extracting logic into a useInput hook, significantly simplifying the component's implementation (src/components/atoms/input/Input.tsx, src/components/atoms/input/useInput.ts) [1] [2].
  • Link Component: Abstracted logic into a useLink hook, streamlining the Link component (src/components/atoms/link/Link.tsx, src/components/atoms/link/useLink.ts) [1] [2].

Removal of Ripple Effect

  • Removed the ripple effect styles and related code from the Button, IconButton, and Input components, as the feature is no longer used (src/components/atoms/button/style.css, src/components/atoms/icon-button/style.css, src/components/atoms/input/Input.tsx) [1] [2].

These changes improve the reusability and readability of the codebase while removing unused features.

@netlify
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for egdev6-design-system ready!

Name Link
🔨 Latest commit d76f792
🔍 Latest deploy log https://app.netlify.com/projects/egdev6-design-system/deploys/6882542c316150000789e10f
😎 Deploy Preview https://deploy-preview-72--egdev6-design-system.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.

@egdev6 egdev6 merged commit 89b1e48 into main Jul 24, 2025
4 checks passed
@egdev6 egdev6 deleted the feature/update-components-hook branch July 24, 2025 15:43
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