mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-22 09:29:16 +01:00
Some minor tweaks
This commit is contained in:
@@ -66,7 +66,7 @@ function App() {
|
||||
</nav>
|
||||
<VStack className="w-full">
|
||||
<HStack as={WindowDragRegion} items="center" className="pl-4 pr-1">
|
||||
<h5>Hello, Friend!</h5>
|
||||
<h5 className="pointer-events-none text-gray-800">Send Request</h5>
|
||||
<IconButton icon="gear" className="ml-auto" size="sm" />
|
||||
</HStack>
|
||||
<VStack className="p-4 max-w-[35rem] mx-auto" space={3}>
|
||||
@@ -74,6 +74,7 @@ function App() {
|
||||
<DropdownMenuRadio
|
||||
onValueChange={setMethod}
|
||||
value={method}
|
||||
label="HTTP Method"
|
||||
items={[
|
||||
{ label: 'GET', value: 'get' },
|
||||
{ label: 'PUT', value: 'put' },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import classnames from 'classnames';
|
||||
import { ButtonHTMLAttributes, forwardRef } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { Icon } from './Icon';
|
||||
|
||||
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
||||
|
||||
@@ -16,6 +16,7 @@ interface DropdownMenuRadioProps {
|
||||
children: ReactNode;
|
||||
onValueChange: ((value: string) => void) | null;
|
||||
value: string;
|
||||
label?: string;
|
||||
items: {
|
||||
label: string;
|
||||
value: string;
|
||||
@@ -26,6 +27,7 @@ export function DropdownMenuRadio({
|
||||
children,
|
||||
items,
|
||||
onValueChange,
|
||||
label,
|
||||
value,
|
||||
}: DropdownMenuRadioProps) {
|
||||
return (
|
||||
@@ -33,6 +35,7 @@ export function DropdownMenuRadio({
|
||||
<DropdownMenuTrigger>{children}</DropdownMenuTrigger>
|
||||
<DropdownMenuPortal>
|
||||
<DropdownMenuContent>
|
||||
{label && <DropdownMenuLabel>{label}</DropdownMenuLabel>}
|
||||
<DropdownMenuRadioGroup onValueChange={onValueChange ?? undefined} value={value}>
|
||||
{items.map((item) => (
|
||||
<DropdownMenuRadioItem key={item.value} value={item.value}>
|
||||
|
||||
@@ -6,7 +6,7 @@ type Props = HTMLAttributes<HTMLDivElement>;
|
||||
export function WindowDragRegion({ className, ...props }: Props) {
|
||||
return (
|
||||
<div
|
||||
className={classnames(className, 'w-full h-11 border-b border-gray-500/10')}
|
||||
className={classnames(className, 'w-full h-11 flex-shrink-0 border-b border-gray-500/10')}
|
||||
data-tauri-drag-region=""
|
||||
{...props}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user