Skip to content

feat(a11y): make ScreenReaderOnly can be polymorphic component using as prop #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

manudeli
Copy link
Member

@manudeli manudeli commented Jan 26, 2023

Make ScreenReaderOnly can be polymorphic component using as prop

AS-IS

  1. as prop can accept only span so as prop have no feature currently.
  2. component can't accept ref

TO-BE

  1. as prop can accept all and as will change component's self props type.
  2. component can accept ref

Polymorphism Test

  1. if put "a" in as prop, component's Props will be changed, component as a tag will be available to accept href prop.
  2. ref's type will be changed by changing of as prop

Jan-27-2023 02-16-49

PR Checklist

  • I read and included theses actions below
  1. I have read the Contributing Guide
  2. I have written documents and tests, if needed.

@netlify
Copy link

netlify bot commented Jan 26, 2023

Deploy Preview for slash-libraries ready!

Name Link
🔨 Latest commit a73e0aa
🔍 Latest deploy log https://app.netlify.com/sites/slash-libraries/deploys/63d85592c997e300088946d0
😎 Deploy Preview https://deploy-preview-201--slash-libraries.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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.

2 participants