update more button and misc. styling

This commit is contained in:
Daniel Avila 2023-03-31 18:38:58 -04:00
parent 92dbdcaaa2
commit 404566c1fb
2 changed files with 213 additions and 226 deletions

View file

@ -6,8 +6,7 @@ import { Slider } from '~/components/ui/Slider.tsx';
import OptionHover from './OptionHover';
import {
HoverCard,
HoverCardTrigger
// HoverCardContent,
HoverCardTrigger,
} from '~/components/ui/HoverCard.tsx';
import { cn } from '~/utils/';
const defaultTextProps =
@ -26,21 +25,10 @@ function Settings() {
const [presP, setPresP] = useState(0);
const textareaRef = useRef(null);
const inputRef = useRef(null);
//
return (
<div>
{/* <DialogDescription className="text-gray-600 dark:text-gray-300">
Note: important instructions are often better placed in your message rather than the prefix.{' '}
<a
href="https://platform.openai.com/docs/guides/chat/instructing-chat-models"
target="_blank"
rel="noopener noreferrer"
>
<u>More info here</u>
</a>
</DialogDescription> */}
<>
<div className="grid gap-4 py-4">
<div className="grid gap-4 py-4 px-5">
<div className="grid grid-cols-4 items-center gap-4">
<Label
htmlFor="chatGptLabel"
@ -85,7 +73,6 @@ function Settings() {
<div className="flex justify-around">
<HoverCard>
<HoverCardTrigger className="group/temp mr-4 flex w-full items-center justify-end gap-4">
{/* <div className="mr-4 flex w-full items-center justify-end gap-4"> */}
<Label
htmlFor="temperature"
className="mr-2 text-right"
@ -98,14 +85,12 @@ function Settings() {
onChange={e => setTemperature(e.target.value)}
className={cn(defaultTextProps, cn(optionText, 'w-10 group-hover/temp:border-gray-200'))}
/>
{/* </div> */}
</HoverCardTrigger>
<OptionHover
type="temp"
side="right"
/>
</HoverCard>
{/* <div className="mr-4 flex w-full items-center justify-end gap-4"> */}
<HoverCard>
<HoverCardTrigger className="group/max mr-4 flex w-full items-center justify-end gap-4">
<Label
@ -126,7 +111,6 @@ function Settings() {
side="left"
/>
</HoverCard>
{/* </div> */}
</div>
<div className="grid grid-cols-2 items-center gap-5">
@ -249,7 +233,6 @@ function Settings() {
</div>
</div>
</>
</div>
);
}

View file

@ -1,8 +1,10 @@
import React, { useEffect, useState } from 'react';
import { Settings2 } from 'lucide-react';
import { useRecoilState } from 'recoil';
import ModelSelect from './ModelSelect';
import { Button } from '../../ui/Button.tsx';
import Settings from './Settings.jsx';
import { cn } from '~/utils/';
import store from '~/store';
@ -67,20 +69,20 @@ function OpenAIOptions() {
model={model}
onChange={setModel}
type="button"
className={
cardStyle +
' flex h-[40px] items-center justify-center px-4 hover:bg-slate-50 data-[state=open]:bg-slate-50 dark:hover:bg-gray-600 dark:data-[state=open]:bg-gray-600'
}
className={cn(
cardStyle,
' z-50 flex h-[40px] items-center justify-center px-4 hover:bg-slate-50 data-[state=open]:bg-slate-50 dark:hover:bg-gray-600 dark:data-[state=open]:bg-gray-600'
)}
/>
<Button
type="button"
className={
cardStyle +
' flex h-[40px] items-center justify-center px-4 hover:bg-slate-50 dark:hover:bg-gray-600'
}
className={cn(
cardStyle,
' min-w-4 z-50 flex h-[40px] items-center justify-center px-4 hover:bg-slate-50 dark:hover:bg-gray-600'
)}
onClick={triggerAdvancedMode}
>
<span className="w-full text-center text-xs font-medium font-normal">More</span>
<Settings2 className="w-4" />
</Button>
</div>
<div
@ -105,7 +107,9 @@ function OpenAIOptions() {
Switch to simple mode
</Button>
</div>
<div className="h-[375px] p-5"><Settings/></div>
<div className="h-[375px] p-5">
<Settings />
</div>
</div>
</div>
</>