Add dark mode, range slider, reset view
This commit is contained in:
parent
7d197d73ef
commit
2388ce2883
6 changed files with 181 additions and 34 deletions
23
app/components/ResetView.tsx
Normal file
23
app/components/ResetView.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { useContext } from "react";
|
||||
import {
|
||||
SceneViewContext,
|
||||
SceneViewContextType,
|
||||
} from "../providers/scene-view-provider";
|
||||
|
||||
export function ResetView() {
|
||||
const { sceneView } = useContext(SceneViewContext) as SceneViewContextType;
|
||||
const handleClick = () => {
|
||||
if (!sceneView) return;
|
||||
|
||||
sceneView.resetView();
|
||||
};
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleClick}
|
||||
className="flex items-center justify-center w-10 h-10 text-white text-3xl bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg p-2 pb-3.5 dark:bg-blue-400 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800 hover:cursor-pointer"
|
||||
>
|
||||
<span className="inline-block">⌂</span>
|
||||
</button>
|
||||
);
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue