Theme system refactor (#31)

This commit is contained in:
Gregory Schier
2024-05-21 17:56:06 -07:00
committed by GitHub
parent 8606940dee
commit 83aaeb94f6
82 changed files with 909 additions and 739 deletions

View File

@@ -2,6 +2,7 @@ import { convertFileSrc } from '@tauri-apps/api/core';
import classNames from 'classnames';
import { useState } from 'react';
import type { HttpResponse } from '../../lib/models';
import { Button } from '../core/Button';
interface Props {
response: HttpResponse;
@@ -20,15 +21,15 @@ export function ImageViewer({ response, className }: Props) {
if (!show) {
return (
<>
<div className="text-sm italic text-gray-500">
<div className="text-sm italic text-fg-subtler">
Response body is too large to preview.{' '}
<button
className="cursor-pointer underline hover:text-gray-800"
color="gray"
<Button
className="cursor-pointer underline hover:text-fg"
color="secondary"
onClick={() => setShow(true)}
>
Show anyway
</button>
</Button>
</div>
</>
);

View File

@@ -85,7 +85,6 @@ export function TextViewer({ response, pretty }: Props) {
return (
<Editor
readOnly
className="bg-gray-50 dark:!bg-gray-100"
forceUpdateKey={body}
defaultValue={body}
contentType={contentType}

View File

@@ -24,7 +24,7 @@ export function WebPageViewer({ response }: Props) {
title="Response preview"
srcDoc={contentForIframe}
sandbox="allow-scripts allow-same-origin"
className="h-full w-full rounded border border-highlightSecondary"
className="h-full w-full rounded border border-background-highlight-secondary"
/>
</div>
);