You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

brush.tsx 435B

1234567891011121314151617181920212223
  1. import { useSelector } from 'state'
  2. import styled from 'styles'
  3. export default function Brush(): JSX.Element {
  4. const brush = useSelector(({ data }) => data.brush)
  5. if (!brush) return null
  6. return (
  7. <BrushRect
  8. x={brush.minX}
  9. y={brush.minY}
  10. width={brush.width}
  11. height={brush.height}
  12. />
  13. )
  14. }
  15. const BrushRect = styled('rect', {
  16. fill: '$brushFill',
  17. stroke: '$brushStroke',
  18. zStrokeWidth: 1,
  19. })