Add offline indicator (also to top zone example) (#2083)

This PR adds an offline indicator to the UI package. It's not used in
the default app but we'll use it on tldraw.com, and it makes sense to
include it here as it's generally useful.

### Change Type

- [x] `minor` — New feature

### Test Plan

1. See the zones example.

### Release Notes

- [@tldraw/tldraw] add offline indicator to ui components
This commit is contained in:
Steve Ruiz 2023-10-17 09:32:41 +01:00 committed by GitHub
parent 47e6e4c25a
commit aaf810b015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 114 additions and 8 deletions

View file

@ -1,10 +1,10 @@
import { Tldraw } from '@tldraw/tldraw'
import { OfflineIndicator, Tldraw } from '@tldraw/tldraw'
import '@tldraw/tldraw/tldraw.css'
export default function Example() {
return (
<div className="tldraw__editor">
<Tldraw shareZone={<CustomShareZone />} />
<Tldraw topZone={<OfflineIndicator />} shareZone={<CustomShareZone />} />
</div>
)
}