krishnax12/watchy-eink-smartwatch

This code defines TypeScript modules to import 3D CAD model files (.step and .stp formats) as URLs representing the physical hardware components.

Version
1.2.2
License
MIT
Stars
2

imports/Display.tsx

import type { ChipProps } from "tscircuit";
import displayStep from "../assets/Display.step";

const pinLabels = {
  pin1: ["pin1", "1"],
  pin2: ["pin2", "2"],
} as const;

export const Display = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      pinLabels={pinLabels}
      footprint={
        <footprint>
          <smtpad portHints={["pin1", "1"]} pcbX="0mm" pcbY="0mm" width="1mm" height="1mm" shape="rect" />
        </footprint>
      }
      cadModel={{
        stepUrl: displayStep,
        positionOffset: { x: 0, y: -0.25, z: 1.3 },
        rotationOffset: -90,
      }}
      {...props}
    />
  );
};