website

source code for the ttmaths.uk website
Log | Files | Refs | README

Point.jsx (410B)


      1 import Label from './Label.jsx';
      2 import { getColourClass } from '../../scripts/graphUtils.js';
      3 
      4 export default function Point({ point, label=null, colour="auto", position="top" }) {
      5   return (
      6     <g>
      7       <path marker-start="url(#cross)" d={`M ${point} Z`} class={getColourClass(colour)}/>
      8       {label && <Label point={point} position={position} spacing={5} colour={colour}>{label}</Label>}
      9     </g>
     10   );
     11 }