chore: Rename react-components to react
This commit is contained in:
parent
03f5eb75f6
commit
2357fdfaca
132 changed files with 1599 additions and 70 deletions
21
packages/react/src/pattern-xray/point.mjs
Normal file
21
packages/react/src/pattern-xray/point.mjs
Normal file
|
@ -0,0 +1,21 @@
|
|||
// __SDEFILE__ - This file is a dependency for the stand-alone environment
|
||||
import React from 'react'
|
||||
// Components
|
||||
import { Point } from '../pattern/point.mjs'
|
||||
import { withinPartBounds } from '../pattern/utils.mjs'
|
||||
|
||||
export const PointXray = ({ stackName, pointName, part, point, settings, components, t }) => {
|
||||
// Don't include parts outside the part bounding box
|
||||
if (!withinPartBounds(point, part)) return null
|
||||
return (
|
||||
<>
|
||||
<Point {...{ stackName, pointName, part, point, settings, components, t }} />
|
||||
<circle
|
||||
cx={point.x}
|
||||
cy={point.y}
|
||||
r={1.5 * (settings.scale || 1)}
|
||||
className="stroke-md opacity-70"
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue