Refactor/extract demo components to modules#219
Merged
ibrahimcesar merged 3 commits intomainfrom Nov 15, 2025
Merged
Conversation
β¦ modules This refactoring improves maintainability and organization of the demo application by: ## Component Modularization - Created `/demo/components/` folder structure with: - `Header.js` - Page header with title, description, and version info - `Footer.js` - Footer with resource links - `Navigation.js` - Quick navigation component - `/examples/` folder containing 11 separate example components - Reduced `demo/pages/index.js` from 1,249 lines to 178 lines (86% reduction) - Each example is now self-contained in its own file for easier maintenance ## CSS Module Extraction - Created dedicated CSS module files: - `Navigation.module.css` - Navigation component styles - `Footer.module.css` - Footer component styles - `EventsExample.module.css` - EventsExample component styles (40+ classes) - Removed all inline styles from: - Navigation.js (reduced from 54 to 24 lines) - Footer.js (removed all inline styles) - EventsExample.js (removed 150+ lines of inline style objects) ## Benefits - β Better code organization and separation of concerns - β Easier to locate and edit specific examples - β Cleaner git diffs for future changes - β Improved performance (styles compiled at build time) - β Consistent styling pattern across all components - β Better maintainability with scoped CSS modules ## Technical Details - All functionality preserved - no breaking changes - Proper use of CSS modules with scoped class names - Template literals for combining multiple CSS classes - Maintained all existing component features and event handlers π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added 5rem padding-bottom to .madeWidth class to improve visual spacing at the bottom of the page. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merged latest changes from main branch, incorporating the publishConfig addition for npm package publication settings. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
size-limit report π¦
|
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.
No description provided.