react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

FIX use early return to VisuallyHidden

Open Collection50 opened this issue 1 year ago • 0 comments

Before

image

After

image

What I did

  1. Early-return was used to improve the readability of the if/else syntax.
  2. The stability was improved by eliminating the possibility of reallocation of the let using const.

✅ Pull Request Checklist:

  • [ ] Included link to corresponding React Spectrum GitHub Issue.
  • [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [ ] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

Collection50 avatar Apr 30 '24 03:04 Collection50