prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
153 stars 40 forks source link

fix: warn when passing `className` to `<PrismicRichText>` or `<PrismicText>` #179

Closed angeloashmore closed 11 months ago

angeloashmore commented 11 months ago

Types of changes

Description

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

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:

🐝

github-actions[bot] commented 11 months ago

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% 🔽)