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: warn when passing className to <PrismicRichText> or <PrismicText> #179

Merged
merged 1 commit into from May 9, 2023

Conversation

angeloashmore
Copy link
Member

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR adds a development-only warning when a className prop is passed to the following components:

  • <PrismicRichText>
  • <PrismicText>

These components do not support a className prop, but their purpose suggests they do.

See the classname-is-not-a-valid-prop.md message for more details.

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

🐝

@github-actions
Copy link

github-actions bot commented May 9, 2023

size-limit report 📦

Path Size
./dist/index.cjs 7.73 KB (-1.99% 🔽)
./dist/index.js 5.3 KB (-2.75% 🔽)
./dist/react-server.cjs 6.84 KB (-2.2% 🔽)
./dist/react-server.js 4.79 KB (-2.99% 🔽)

@angeloashmore angeloashmore merged commit aac1cc7 into master May 9, 2023
1 check passed
@angeloashmore angeloashmore deleted the aa/className-warning branch May 9, 2023 02:27
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.

None yet

1 participant