您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

brush.tsx 427B

1234567891011121314151617181920212223
  1. import { useSelector } from "state"
  2. import styled from "styles"
  3. export default function Brush() {
  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. className="brush"
  13. />
  14. )
  15. }
  16. const BrushRect = styled("rect", {
  17. fill: "$brushFill",
  18. stroke: "$brushStroke",
  19. })