-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add originalLayer to footprint, minor refactor (#53)
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { layer_ref, type LayerRef } from "@tscircuit/soup" | ||
import { expectTypesMatch } from "lib/typecheck" | ||
import { z } from "zod" | ||
|
||
export interface FootprintProps { | ||
/** | ||
* The layer that the footprint is designed for. If you set this to "top" | ||
* then it means the children were intended to represent the top layer. If | ||
* the <chip /> with this footprint is moved to the bottom layer, then the | ||
* components will be mirrored. | ||
* | ||
* Generally, you shouldn't set this except where it can help prevent | ||
* confusion because you have a complex multi-layer footprint. Default is | ||
* "top" and this is most intuitive. | ||
*/ | ||
originalLayer?: LayerRef | ||
} | ||
|
||
export const footprintProps = z.object({ | ||
originalLayer: layer_ref.default("top").optional(), | ||
}) | ||
|
||
export type FootprintPropsInput = z.input<typeof footprintProps> | ||
type InferredFootprintProps = z.infer<typeof footprintProps> | ||
expectTypesMatch<InferredFootprintProps, FootprintProps>(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters