tldraw/packages/core/src/components/brush/brush.tsx
Steve Ruiz 8ae625baef
Fix stale inputs reference (#92)
* Add `onMount` to Renderer to share inputs

* Removes brush updater

* Update brush.test.tsx
2021-09-17 22:29:45 +01:00

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>
)
})