add version attribute (#4192)

Occasionally I come across tldraw in the wild and want to see what
version it is.

### Change type

- [x] `other`
This commit is contained in:
alex 2024-07-16 14:24:44 +01:00 committed by GitHub
parent d85aac58b3
commit 48d1f4e0d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,7 @@ import React, {
} from 'react'
import classNames from 'classnames'
import { version } from '../version'
import { OptionalErrorBoundary } from './components/ErrorBoundary'
import { DefaultErrorFallback } from './components/default-components/DefaultErrorFallback'
import { TLEditorSnapshot } from './config/TLEditorSnapshot'
@ -223,6 +224,7 @@ export const TldrawEditor = memo(function TldrawEditor({
return (
<div
ref={setContainer}
data-tldraw={version}
draggable={false}
className={classNames(`${TL_CONTAINER_CLASS} tl-theme__light`, className)}
onPointerDown={stopEventPropagation}