classFor
Transforms all "class" and "for" props to "className" and "htmlFor".
Installation
npm install react-beyond @react-beyond/classfor
Usage
import { Beyond } from 'react-beyond'
import { classFor } from '@react-beyond/classfor'
<Beyond features={[classFor(<options>)]}>
<App />
</Beyond>
Options
id
- The id of the feature HOC. Defaults to"classFor"
.onlyDom
- Whether to replace theclass
prop on components too, not just on DOM elements. It never replaces thefor
prop on components. Defaults tofalse
.clsx
- Whether to accept clsx syntax.