annotate asset props, correct image/video confusion (#2399)

Annotates the asset props example

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Annotates the asset props example and fixes a mistake in the existing
comments
pull/2402/head
Taha 2024-01-03 13:54:57 +00:00 zatwierdzone przez GitHub
rodzic 918e735510
commit 85389551e6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ export default function AssetPropsExample() {
<Tldraw
// only allow jpegs
acceptedImageMimeTypes={['image/jpeg']}
// don't allow any images
// don't allow any videos
acceptedVideoMimeTypes={[]}
// accept images of any dimension
maxImageDimension={Infinity}
@ -17,3 +17,9 @@ export default function AssetPropsExample() {
</div>
)
}
/*
This example shows how to use props on the Tldraw component to control what types of
assets can be uploaded.
*/