From dfb673d0ef40f86447451f41d9eb1fffb4e0a6d0 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 11 Jul 2023 09:46:58 +0100 Subject: [PATCH] naming consistency --- packages/ui/components/EditorSwitch.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/components/EditorSwitch.tsx b/packages/ui/components/EditorSwitch.tsx index d327c2d20..2f22f052f 100644 --- a/packages/ui/components/EditorSwitch.tsx +++ b/packages/ui/components/EditorSwitch.tsx @@ -5,7 +5,7 @@ import classNames from 'classnames' // Define styles as constants outside the component to avoid recreating these during each render const transitionStyle = 'transition duration-200 ease-in-out' -const switchClass = 'relative bg-gray-800 flex h-[35px] w-[62px] cursor-pointer rounded' +const switchStyle = 'relative bg-gray-800 flex h-[35px] w-[62px] cursor-pointer rounded' const switchSpanClass = 'pointer-events-none absolute h-[25px] inline-block w-[25px] transform rounded bg-primary transition duration-200 ease-in-out' const switchIconsClass = 'flex flex-grow justify-between content-center z-10 m-[4px]' @@ -18,16 +18,16 @@ export interface EditorSwitchProps { export const EditorSwitch: React.FC = ({ isCodeEditor = true, onSwitchChange }) => { const visualIconStyle = classNames(transitionStyle, isCodeEditor ? 'stroke-gray-400' : 'stroke-white') const codeIconStyle = classNames(transitionStyle, isCodeEditor ? 'stroke-white' : 'stroke-gray-400') - const spanClass = classNames(switchSpanClass, isCodeEditor ? 'translate-x-7' : 'translate-x-0') + const thumbStyle = classNames(switchSpanClass, isCodeEditor ? 'translate-x-7' : 'translate-x-0') return ( - +
-
)