Files
ukraine-timemap/src/components/time/atoms/DatetimeStar.js
Lachlan Kermode e99398ceab Cleaning technical debt (#192)
* abstract Space component to switch out Map

* basic viewing possible

* restructure components dir

* all jsx --> js

* App.jsx --> App.js

* comment out 3d for now
2021-01-19 22:22:12 +01:00

28 lines
436 B
JavaScript

import React from "react";
const DatetimeStar = ({
x,
y,
r,
transform,
onSelect,
styleProps,
extraRender,
}) => {
const s = (r * 2) / 3;
return (
<polygon
onClick={onSelect}
className="event"
x={x}
y={y - r}
style={styleProps}
points={`${x},${y + s} ${x - s},${y - s} ${x + s},${y} ${x - s},${y} ${
x + s
},${y - s}`}
/>
);
};
export default DatetimeStar;