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 { RayShape, ShapeStyles, ShapeType } from 'types'
import { RayShape, ShapeProps, ShapeType } from 'types'
import { defaultStyle } from 'state/shape-styles'
/**
* ## Ray
*/
export default class Ray extends CodeShape<RayShape> {
constructor(props = {} as Partial<RayShape> & Partial<ShapeStyles>) {
constructor(props = {} as ShapeProps<RayShape>) {
super({
id: uniqueId(),
seed: Math.random(),