選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

center-handle.tsx 577B

123456789101112131415161718192021222324252627282930313233343536
  1. import styled from 'styles'
  2. import { Bounds } from 'types'
  3. export default function CenterHandle({
  4. bounds,
  5. isLocked,
  6. }: {
  7. bounds: Bounds
  8. isLocked: boolean
  9. }): JSX.Element {
  10. return (
  11. <StyledBounds
  12. x={-1}
  13. y={-1}
  14. width={bounds.width + 2}
  15. height={bounds.height + 2}
  16. pointerEvents="none"
  17. isLocked={isLocked}
  18. />
  19. )
  20. }
  21. const StyledBounds = styled('rect', {
  22. fill: 'none',
  23. stroke: '$bounds',
  24. zStrokeWidth: 1.5,
  25. variants: {
  26. isLocked: {
  27. true: {
  28. zStrokeWidth: 1.5,
  29. zDash: 2,
  30. },
  31. },
  32. },
  33. })