From 89bca42ee67bf7f07ea60540ae9623c29d046c23 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 21 Mar 2023 18:31:05 -0700 Subject: [PATCH] Minor style tweaks --- src-web/components/DropMarker.tsx | 16 +++++++++++++--- src-web/components/RequestMethodDropdown.tsx | 2 +- src-web/components/RequestPane.tsx | 5 +++++ src-web/components/Workspace.tsx | 4 ++-- src-web/components/core/Button.tsx | 3 ++- src-web/components/core/PairEditor.tsx | 10 +++++++--- src-web/components/core/Tabs/Tabs.tsx | 2 +- src-web/lib/theme/window.ts | 2 +- tailwind.config.cjs | 1 + 9 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src-web/components/DropMarker.tsx b/src-web/components/DropMarker.tsx index 9ca4e557..7876e506 100644 --- a/src-web/components/DropMarker.tsx +++ b/src-web/components/DropMarker.tsx @@ -1,10 +1,20 @@ +import classnames from 'classnames'; import React, { memo } from 'react'; +interface Props { + className?: string; +} + export const DropMarker = memo( - function DropMarker() { + function DropMarker({ className }: Props) { return ( -
-
+
+
); }, diff --git a/src-web/components/RequestMethodDropdown.tsx b/src-web/components/RequestMethodDropdown.tsx index 91aab2e2..c72907ab 100644 --- a/src-web/components/RequestMethodDropdown.tsx +++ b/src-web/components/RequestMethodDropdown.tsx @@ -20,7 +20,7 @@ export const RequestMethodDropdown = memo(function RequestMethodDropdown({ }: Props) { return ( - diff --git a/src-web/components/RequestPane.tsx b/src-web/components/RequestPane.tsx index c3713d48..85f3d052 100644 --- a/src-web/components/RequestPane.tsx +++ b/src-web/components/RequestPane.tsx @@ -81,6 +81,11 @@ export function RequestPane({ fullHeight, className }: Props) { tabListClassName="pl-3" label="Request body" > + +
+
Hello
+
+
900; + const isSideBySide = mainContentWidth > 700; if (activeWorkspace == null) { return null; @@ -65,7 +65,7 @@ export default function Workspace() { fullHeight={isSideBySide} className={classnames(isSideBySide ? 'pr-1.5' : 'pr-3 pb-0')} /> - +
diff --git a/src-web/components/core/Button.tsx b/src-web/components/core/Button.tsx index 648111aa..13fc9c17 100644 --- a/src-web/components/core/Button.tsx +++ b/src-web/components/core/Button.tsx @@ -17,7 +17,7 @@ const colorStyles = { export type ButtonProps = HTMLAttributes & { to?: string; color?: keyof typeof colorStyles; - size?: 'sm' | 'md'; + size?: 'sm' | 'md' | 'xs'; justify?: 'start' | 'center'; type?: 'button' | 'submit'; forDropdown?: boolean; @@ -51,6 +51,7 @@ const _Button = forwardRef(function Button( justify === 'center' && 'justify-center', size === 'md' && 'h-md px-3', size === 'sm' && 'h-sm px-2.5 text-sm', + size === 'xs' && 'h-xs px-2 text-sm', ), [color, size, justify, className], ); diff --git a/src-web/components/core/PairEditor.tsx b/src-web/components/core/PairEditor.tsx index d8a608b0..4ef51212 100644 --- a/src-web/components/core/PairEditor.tsx +++ b/src-web/components/core/PairEditor.tsx @@ -125,9 +125,9 @@ export const PairEditor = memo(function PairEditor({ className={classnames( className, '@container', - 'pb-6 grid', + 'pb-2 grid', // NOTE: Add padding to top so overflow doesn't hide drop marker - 'py-1', + 'pt-1', )} > {pairs.map((p, i) => { @@ -137,6 +137,7 @@ export const PairEditor = memo(function PairEditor({ {hoveredIndex === i && } void; onEnd: (id: string) => void; @@ -180,6 +182,7 @@ type FormRowProps = { >; const FormRow = memo(function FormRow({ + className, pairContainer, onChange, onDelete, @@ -247,7 +250,8 @@ const FormRow = memo(function FormRow({
({ >
{tabs.map((t) => { diff --git a/src-web/lib/theme/window.ts b/src-web/lib/theme/window.ts index 16e382e5..14d70a8d 100644 --- a/src-web/lib/theme/window.ts +++ b/src-web/lib/theme/window.ts @@ -32,7 +32,7 @@ const lightTheme: AppTheme = { gray: '#7f8fb0', red: '#ec3f87', orange: '#ff8b00', - yellow: '#deda00', + yellow: '#e7cf24', green: '#00d365', blue: '#0090ff', pink: '#f670f6', diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 8e33209d..5223b71d 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -1,4 +1,5 @@ const height = { + "xs": "1.5rem", "sm": "2rem", "md": "2.5rem" };