Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Dec 13, 2024
1 parent 4ac490e commit 57f98fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/builder/app/builder/shared/floating-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const useSideOffset = ({
side?: "left" | "right";
isOpen: boolean;
containerRef?: RefObject<null | HTMLElement>;
}): [RefObject<HTMLButtonElement>, number] => {
}): [RefObject<null | HTMLButtonElement>, number] => {
const triggerRef = useRef<null | HTMLButtonElement>(null);
const [sideOffset, setSideOffset] = useState(0);

Expand Down
6 changes: 4 additions & 2 deletions apps/builder/app/canvas/features/build-mode/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
$isPreviewMode,
$selectedInstanceSelector,
} from "~/shared/nano-states";
import type { InstanceSelector } from "~/shared/tree-utils";

export const Block = React.forwardRef<
HTMLDivElement,
Expand Down Expand Up @@ -61,8 +62,9 @@ export const Block = React.forwardRef<
return (
<div style={{ display: "contents" }} ref={ref} {...props}>
{childArray.filter((child) => {
const { instanceSelector } = child.props;

const { instanceSelector } = child.props as {
instanceSelector: InstanceSelector;
};
return instanceSelector[0] === templateInstanceId;
})}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type Props = ComponentProps<typeof ItemButton> & {
draggable?: boolean;
label: React.ReactElement;
thumbnail?: React.ReactElement;
buttons?: React.ReactElement;
buttons?: React.ReactElement<{ children: ReactNode }>;
// to support Radix trigger asChild
"data-state"?: "open";
// for Storybook purposes
Expand Down

0 comments on commit 57f98fd

Please sign in to comment.