Restore background (#2037)

This PR restores the missing background component (which includes the
background color).

### Change Type

- [x] `patch` — Bug fix
This commit is contained in:
Steve Ruiz 2023-10-09 07:19:41 +01:00 committed by GitHub
parent cfb007599a
commit e2a6f3ed40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 30 deletions

View file

@ -273,6 +273,7 @@ input,
.tl-background { .tl-background {
position: absolute; position: absolute;
background-color: var(--color-background);
inset: 0px; inset: 0px;
} }

View file

@ -1,6 +1,9 @@
import { createContext, useContext, useMemo } from 'react' import { createContext, useContext, useMemo } from 'react'
import { ShapeIndicator, TLShapeIndicatorComponent } from '../components/ShapeIndicator' import { ShapeIndicator, TLShapeIndicatorComponent } from '../components/ShapeIndicator'
import { TLBackgroundComponent } from '../components/default-components/DefaultBackground' import {
DefaultBackground,
TLBackgroundComponent,
} from '../components/default-components/DefaultBackground'
import { DefaultBrush, TLBrushComponent } from '../components/default-components/DefaultBrush' import { DefaultBrush, TLBrushComponent } from '../components/default-components/DefaultBrush'
import { import {
DefaultCollaboratorHint, DefaultCollaboratorHint,
@ -88,7 +91,7 @@ export function EditorComponentsProvider({ overrides, children }: ComponentsCont
<EditorComponentsContext.Provider <EditorComponentsContext.Provider
value={useMemo( value={useMemo(
() => ({ () => ({
Background: null, Background: DefaultBackground,
SvgDefs: DefaultSvgDefs, SvgDefs: DefaultSvgDefs,
Brush: DefaultBrush, Brush: DefaultBrush,
ZoomBrush: DefaultBrush, ZoomBrush: DefaultBrush,

View file

@ -13548,34 +13548,6 @@
"startIndex": 1, "startIndex": 1,
"endIndex": 2 "endIndex": 2
} }
},
{
"kind": "PropertySignature",
"canonicalReference": "@tldraw/tldraw!TldrawUiBaseProps#topZone:member",
"docComment": "/**\n * A component to use for the top zone (will be deprecated)\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "topZone?: "
},
{
"kind": "Reference",
"text": "ReactNode",
"canonicalReference": "@types/react!React.ReactNode:type"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "topZone",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
} }
], ],
"extendsTokenRanges": [] "extendsTokenRanges": []