feat: add txn-retry-button component with preview and documentation #194
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.
This pull request introduces two new UI components for transaction feedback: a toast notification for transaction status and a smart retry button. It also adds documentation and preview pages for both components, and makes them available for import in the Murphy UI library. These additions improve user experience by providing real-time transaction status updates and robust retry mechanisms.
New Transaction Feedback Components:
TxnFeedbackToastcomponent to display real-time toast notifications for transaction states such as preparing, signing, sending, confirming, success, and error, with context-aware actions (e.g., retry, copy signature, close). (components/ui/murphy/Txn-Feedback/txn-feedback-toast.tsx)TxnRetryButtoncomponent that supports configurable retry logic (max retries, delay, loading state, disabled state, retry counter, and custom labels/styles). (components/ui/murphy/Txn-Feedback/txn-retry-button.tsx)Documentation and Previews:
TxnFeedbackToastandTxnRetryButton, including installation instructions, prop tables, and example strategies for different error types. (content/docs/onchainkit/Txn-Feedback/txn-feedback-toast.mdx,content/docs/onchainkit/Txn-Feedback/txn-retry-button.mdx) [1] [2]components/txn-feedback-toast-preview.tsx,components/txn-retry-button-preview.tsx) [1] [2]Murphy UI Library Integration:
TxnFeedbackToastandTxnRetryButtonfrom the Murphy UI library for easy use across the app. (components/ui/murphy/index.tsx) [1] [2]Meta and Navigation Updates:
content/docs/onchainkit/meta.json)These changes collectively enhance the developer and user experience for transaction flows, making error handling and feedback more transparent and actionable.