Skip to content

Commit 57f98fd

Browse files
committed
fix types
1 parent 4ac490e commit 57f98fd

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

apps/builder/app/builder/shared/floating-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

apps/builder/app/canvas/features/build-mode/block.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

1819
export 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>

packages/design-system/src/components/css-value-list-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)