From cdb9f59897eff9cb657f48ee56eea3a176c41bc2 Mon Sep 17 00:00:00 2001 From: wil Date: Fri, 29 Mar 2024 18:15:43 -0400 Subject: [PATCH] perfect styling --- app/components/InputVector.tsx | 48 +++++++++++-------- app/pages/PageEnigma/PageEnigmaComponent.tsx | 5 +- .../ControlPanelSceneObject.tsx | 13 ++--- tailwind.config.ts | 9 +++- 4 files changed, 43 insertions(+), 32 deletions(-) diff --git a/app/components/InputVector.tsx b/app/components/InputVector.tsx index 2a032631cb..cf0df1934f 100644 --- a/app/components/InputVector.tsx +++ b/app/components/InputVector.tsx @@ -1,4 +1,5 @@ import { useRef } from "react"; +import { twMerge } from "tailwind-merge"; interface InputVectorProps { @@ -20,7 +21,9 @@ export const InputVector = ({ const yRef = useRef(null); const zRef = useRef(null); - const className="relative w-14 h-8 rounded-r-md bg-brand-secondary p-3 text-white transition-all duration-150 ease-in-out outline-none outline-offset-0 focus:outline-brand-primary"; + const inputCommonClasses ="relative w-14 h-8 rounded-r-md bg-brand-secondary p-3 text-base text-white transition-all duration-150 ease-in-out outline-none -outline-offset-2 "; + + const wrapperCommonClasses = "flex items-center before:inline-block before:w-10 before:h-10 before:bg-brand-primary before:text-white before:rounded-l-md before:h-8 before:w-4 before:text-center before:align-middle before:leading-8 text-xs"; function handleOnChange(){ const newVector = { @@ -32,24 +35,31 @@ export const InputVector = ({ } return(
- - - + + + + + + + + +
); } \ No newline at end of file diff --git a/app/pages/PageEnigma/PageEnigmaComponent.tsx b/app/pages/PageEnigma/PageEnigmaComponent.tsx index 150cf98acc..55ac9143b8 100644 --- a/app/pages/PageEnigma/PageEnigmaComponent.tsx +++ b/app/pages/PageEnigma/PageEnigmaComponent.tsx @@ -81,10 +81,7 @@ export const PageEnigmaComponent = () => {
- +
{appUiState.viewMode === APPUI_VIEW_MODES.SIDE_BY_SIDE && ( diff --git a/app/pages/PageEnigma/comps/ControlPanelSceneObject/ControlPanelSceneObject.tsx b/app/pages/PageEnigma/comps/ControlPanelSceneObject/ControlPanelSceneObject.tsx index 04c859049c..01358ed7be 100644 --- a/app/pages/PageEnigma/comps/ControlPanelSceneObject/ControlPanelSceneObject.tsx +++ b/app/pages/PageEnigma/comps/ControlPanelSceneObject/ControlPanelSceneObject.tsx @@ -1,17 +1,17 @@ -import { useContext, useState } from 'react'; +import { useContext } from 'react'; import { Transition } from "@headlessui/react"; import { faArrowRightArrowLeft, faCube, faTrash} from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { AppUiContext } from '../../contexts/AppUiContext'; -import { Button, H4, InputVector } from "~/components"; +import { Button, H4, H6, InputVector } from "~/components"; import { XYZ } from '../../datastructures/common'; export const ControlPanelSceneObject = () => { - const [appUiState,dispatchAppUiState ] = useContext(AppUiContext); + const [appUiState, dispatchAppUiState ] = useContext(AppUiContext); const position = appUiState?.currentSceneObject.objectVectors.position; const rotation = appUiState?.currentSceneObject.objectVectors.rotation; @@ -29,9 +29,6 @@ export const ControlPanelSceneObject = () => { console.log(xyz); // setScalar(xyz); } - // useEffect(()=>{ - - // },[position,rotation,scalar]); return( {

Object Name

- -

Swap Object

+ +
Swap Object
diff --git a/tailwind.config.ts b/tailwind.config.ts index 482b42e119..2583148f3f 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -126,9 +126,16 @@ export default { "ui-controls-button": "#676781", "ui-divider": "#515168", + "axis-x" :"#D33242", + "axis-y" :"#308752", + "axis-z" :"#2E70FF", + red: "#D33242", + green:"#308752", + blue: "#2E70FF", + + white: colors.white, gray: colors.gray, black: colors.black, - white: colors.white, }, }, plugins: [],