Skip to content

Enhance the readability of doc-sites examples#69

Merged
balajis-qb merged 5 commits into
mainfrom
enhancement/docs-site/tsx-examples
Dec 5, 2025
Merged

Enhance the readability of doc-sites examples#69
balajis-qb merged 5 commits into
mainfrom
enhancement/docs-site/tsx-examples

Conversation

@balajis-qb

Copy link
Copy Markdown
Collaborator

Description

In this PR, I enhanced the readability of the doc-sites examples by removing the redundant code.

Changes

  • Removed the redundant wrapper onChange event handlers from all the examples
  • Extracted the custom header rendering logic into a separate function, renderHeader to make the TSX clean
  • Update the custom types more readable

Contribution checklist

  • I have followed the contributing guidelines.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

…tly in examples

Updated multiple DatePicker components across various example files to simplify the onChange handler by directly using setSelectedDate instead of wrapping it in an arrow function. This change enhances code readability and consistency and avoid the unnecessary wrapper
…dability

Extracted the custom header rendering logic into a separate function, renderHeader, to enhance code clarity and maintainability in the RenderCustomHeaderTwoMonths example. This change simplifies the DatePicker component's renderCustomHeader prop.
…andling

Updated the handleChangeRaw function to accept a more specific event type and simplified the onChangeRaw prop by directly passing the handler. This change enhances code clarity and maintains consistency in event handling across the DatePicker examples.
Updated various TypeScript type definitions across multiple example files to use `Array<{}>` syntax for better clarity and uniformity. This change enhances code readability and maintains consistency in how date-related types are defined throughout the documentation examples.
@balajis-qb
balajis-qb merged commit fd145a4 into main Dec 5, 2025
3 of 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.

1 participant