Adds error boundary, improves code shapes types.

This commit is contained in:
Steve Ruiz 2021-06-24 23:09:36 +01:00
parent 69bdab520a
commit 32922b3f85
16 changed files with 518 additions and 76 deletions

View file

@ -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(),