Skip to content
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

Fix some warnings in the FormAutocomplete component #449

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

t-wright
Copy link
Contributor

Description

We're currently passing the classNames prop to <FormSelectArrow /> which gets passed on to the icon itself, resulting in the warning: React does not recognize the classNames prop on a DOM element

We also currently expect a string for the label prop, which causes a prop type warning when we pass it an element (e.g. by including screen reader text within the label).

Steps to Test

  1. Pull down PR.
  2. npm run dev.
  3. Open Storybook.
  4. Check the console, verify no React does not recognize the classNames prop on a DOM element warning is present.
  5. Update src/system/NewForm/FormAutocomplete.stories.jsx, passing <></> as the label to <FormAutocomplete />
  6. Verify no prop type warnings are present in the console.

Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for vip-design-system-components ready!

Name Link
🔨 Latest commit 517161f
🔍 Latest deploy log https://app.netlify.com/sites/vip-design-system-components/deploys/670ef539dd2b1100088f31d2
😎 Deploy Preview https://deploy-preview-449--vip-design-system-components.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 configuration.

@t-wright t-wright merged commit 85866a1 into trunk Oct 16, 2024
8 checks passed
@t-wright t-wright deleted the fix/react-warnings branch October 16, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants