Repository navigation
refactor: update ButtonProps target type to include specific values - #132
Conversation
- Changed target prop type from string to a union of specific values: '_blank', '_self', '_parent', and '_top' for better type safety and clarity.
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR tightens the typing of the Button component’s target prop to improve type safety for link-style buttons. It limits target to the standard browser keyword values instead of an arbitrary string.
Changes:
- Updated
ButtonProps.targetfromstringto a string-literal union:'_blank' | '_self' | '_parent' | '_top'. - Ensured the
Buttonlink rendering (<a>) uses this narrowed type without any further behavioral changes.
Summary by CodeRabbit
Release Notes
Note: This release contains no end-user visible changes.
✏️ Tip: You can customize this high-level summary in your review settings.