Notification improvements (#324)

This commit is contained in:
Andrew Prifer 2022-10-21 22:32:53 +02:00 committed by GitHub
parent 965d7085dc
commit 43714fdf17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 47 deletions

View file

@ -36,7 +36,7 @@ const createEditable = <Keys extends keyof JSX.IntrinsicElements>(
if (Component !== 'primitive' && !type) {
throw new Error(
`You must provide the type of the component out of which you're creating an editable. For example: editable(MyComponent, 'mesh').`,
`You must provide the type of the component you're creating an editable for. For example: editable(MyComponent, 'mesh').`,
)
}
@ -103,7 +103,8 @@ const createEditable = <Keys extends keyof JSX.IntrinsicElements>(
The easiest way to create a custom animatable \`${dreiComponent}\` is to import it from \`@react-three/drei\`, and make it editable.
\`\`\`
import {${dreiComponent}} from '@react-three/drei'
const EditableCamera =
const EditableCamera =
editable(${dreiComponent}, '${Component}')
\`\`\`
Then you can use it in your JSX like any other editable component. Note the makeDefault prop exposed by drei, which makes r3f use it for rendering.