Skip to content

Commit

Permalink
Automated linting update and features.json sync
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 17, 2023
1 parent e9f63ed commit 94d0a2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
7 changes: 1 addition & 6 deletions packages/studio-ui/src/components/IFramePortal.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { createPortal } from "react-dom";
import {
Dispatch,
PropsWithChildren,
SetStateAction,
useRef,
} from "react";
import { Dispatch, PropsWithChildren, SetStateAction, useRef } from "react";
import useStudioStore from "../store/useStudioStore";
import { twMerge } from "tailwind-merge";
import useInjectUserStyles from "../hooks/useInjectUserStyles";
Expand Down
11 changes: 5 additions & 6 deletions packages/studio-ui/src/hooks/useInjectUserStyles.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useEffect } from "react";
import useStudioStore from "../store/useStudioStore";

export default function useInjectUserStyles(iframeDocument: Document | undefined) {
export default function useInjectUserStyles(
iframeDocument: Document | undefined
) {
const [
componentTree,
getComponentMetadata,
Expand Down Expand Up @@ -49,15 +51,12 @@ function clearStylingFromIframe(iframeDocument: Document) {
});
}

function injectStyleIntoIframe(
iframeDocument: Document,
filepath: string
) {
function injectStyleIntoIframe(iframeDocument: Document, filepath: string) {
const originalStyletag = document.querySelector(
`[studio-style-filepath='${filepath}']`
);
if (originalStyletag) {
const iframeStyletag = originalStyletag.cloneNode(true);
iframeDocument.head.appendChild(iframeStyletag);
}
}
}
4 changes: 2 additions & 2 deletions packages/studio-ui/src/hooks/useViewportOption.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RefObject, useEffect, useState } from "react";
import { Viewport } from "../components/Viewport/defaults";

export default function useViewportOption (
export default function useViewportOption(
viewport: Viewport,
previewRef: RefObject<HTMLDivElement>
) {
Expand Down Expand Up @@ -31,4 +31,4 @@ export default function useViewportOption (
});

return css;
};
}

0 comments on commit 94d0a2d

Please sign in to comment.