feat(view): import images from file or clipboard
This commit is contained in:
@@ -8,6 +8,7 @@ import { labelForTool } from "./toolLabels";
|
||||
import { resolveTransformTargetBounds } from "@editor/transform-targets";
|
||||
import { getSelectionSummary } from "./selectionSummary";
|
||||
import { useAppState } from "./useAppState";
|
||||
import { useImageImport } from "./useImageImport";
|
||||
import { useViewportActivityIsland } from "./useViewportActivityIsland";
|
||||
import "./index.css";
|
||||
|
||||
@@ -19,6 +20,7 @@ export function App({ app }: AppProps) {
|
||||
const state = useAppState(app.store);
|
||||
const zoomPercent = Math.round(state.editor.viewport.zoom * 100);
|
||||
const viewportActivityIsland = useViewportActivityIsland(state.editor.viewport);
|
||||
const imageImport = useImageImport(app.store);
|
||||
const [layersOpen, setLayersOpen] = useState(false);
|
||||
const selectionSummary = getSelectionSummary(state.document, state.editor.selection);
|
||||
const transformBounds = state.editor.transformSession
|
||||
@@ -27,6 +29,7 @@ export function App({ app }: AppProps) {
|
||||
|
||||
return (
|
||||
<main className="relative h-full overflow-hidden bg-background text-foreground">
|
||||
{imageImport.input}
|
||||
<header className="pointer-events-none absolute inset-x-0 top-0 z-10 flex h-8 items-center justify-between px-3 text-white">
|
||||
<h1 className="text-sm font-medium">Image Studio</h1>
|
||||
<div className="text-xs">
|
||||
|
||||
Reference in New Issue
Block a user