Skip to content

Commit

Permalink
Merge pull request #58 from tscircuit/imrishabh18-patch-1
Browse files Browse the repository at this point in the history
Add width and height for components
  • Loading branch information
imrishabh18 authored Oct 16, 2024
2 parents 5331259 + dd855ff commit 3a25179
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/common/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export interface CommonComponentProps extends CommonLayoutProps {
cadModel?: CadModelProp
children?: any
symbolName?: string
width?: string | number
height?: string | number
}

export const commonComponentProps = commonLayoutProps
Expand All @@ -98,6 +100,8 @@ export const commonComponentProps = commonLayoutProps
cadModel: cadModelProp.optional(),
children: z.any().optional(),
symbolName: z.string().optional(),
width: distance.optional(),
height: distance.optional(),
})

type InferredCommonComponentProps = z.input<typeof commonComponentProps>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@biomejs/biome": "^1.9.2",
"@biomejs/biome": "^1.9.3",
"@tscircuit/layout": "^0.0.11",
"@tscircuit/soup": "^0.0.69",
"@types/bun": "^1.1.8",
Expand Down

0 comments on commit 3a25179

Please sign in to comment.