File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
canvas/features/build-mode
packages/design-system/src/components Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export const useSideOffset = ({
2424 side ?: "left" | "right" ;
2525 isOpen : boolean ;
2626 containerRef ?: RefObject < null | HTMLElement > ;
27- } ) : [ RefObject < HTMLButtonElement > , number ] => {
27+ } ) : [ RefObject < null | HTMLButtonElement > , number ] => {
2828 const triggerRef = useRef < null | HTMLButtonElement > ( null ) ;
2929 const [ sideOffset , setSideOffset ] = useState ( 0 ) ;
3030
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 $isPreviewMode ,
1515 $selectedInstanceSelector ,
1616} from "~/shared/nano-states" ;
17+ import type { InstanceSelector } from "~/shared/tree-utils" ;
1718
1819export const Block = React . forwardRef <
1920 HTMLDivElement ,
@@ -61,8 +62,9 @@ export const Block = React.forwardRef<
6162 return (
6263 < div style = { { display : "contents" } } ref = { ref } { ...props } >
6364 { childArray . filter ( ( child ) => {
64- const { instanceSelector } = child . props ;
65-
65+ const { instanceSelector } = child . props as {
66+ instanceSelector : InstanceSelector ;
67+ } ;
6668 return instanceSelector [ 0 ] === templateInstanceId ;
6769 } ) }
6870 </ div >
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ type Props = ComponentProps<typeof ItemButton> & {
9595 draggable ?: boolean ;
9696 label : React . ReactElement ;
9797 thumbnail ?: React . ReactElement ;
98- buttons ?: React . ReactElement ;
98+ buttons ?: React . ReactElement < { children : ReactNode } > ;
9999 // to support Radix trigger asChild
100100 "data-state" ?: "open" ;
101101 // for Storybook purposes
You can’t perform that action at this time.
0 commit comments