
* Add `onMount` to Renderer to share inputs * Removes brush updater * Update brush.test.tsx
21 lines
548 B
TypeScript
21 lines
548 B
TypeScript
import { SVGContainer } from '+components'
|
|
import { Container } from '+components/container'
|
|
import type { TLBounds } from '+types'
|
|
import * as React from 'react'
|
|
|
|
export const Brush = React.memo(({ brush }: { brush: TLBounds }): JSX.Element | null => {
|
|
return (
|
|
<Container bounds={brush} rotation={0}>
|
|
<SVGContainer>
|
|
<rect
|
|
className="tl-brush"
|
|
opacity={1}
|
|
x={0}
|
|
y={0}
|
|
width={brush.width}
|
|
height={brush.height}
|
|
/>
|
|
</SVGContainer>
|
|
</Container>
|
|
)
|
|
})
|