Adds error boundary, improves code shapes types.
This commit is contained in:
parent
69bdab520a
commit
32922b3f85
16 changed files with 518 additions and 76 deletions
|
@ -1,13 +1,13 @@
|
|||
import CodeShape from './index'
|
||||
import { uniqueId } from 'utils'
|
||||
import { DrawShape, ShapeType } from 'types'
|
||||
import { DrawShape, ShapeProps, ShapeType } from 'types'
|
||||
import { defaultStyle } from 'state/shape-styles'
|
||||
|
||||
/**
|
||||
* ## Draw
|
||||
*/
|
||||
export default class Draw extends CodeShape<DrawShape> {
|
||||
constructor(props = {} as Partial<DrawShape>) {
|
||||
constructor(props = {} as ShapeProps<DrawShape>) {
|
||||
super({
|
||||
id: uniqueId(),
|
||||
seed: Math.random(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue