Some minor tweaks

This commit is contained in:
Gregory Schier
2023-02-21 17:56:48 -08:00
parent 45b7bc2c84
commit 30b1b87fea
6 changed files with 13 additions and 10 deletions

View File

@@ -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> & {

View File

@@ -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}>

View File

@@ -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}
/>