Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 3a857bd

Browse files
committed
style
1 parent c6520e5 commit 3a857bd

File tree

9 files changed

+41
-27
lines changed

9 files changed

+41
-27
lines changed

packages/react-databrowser/src/components/databrowser/components/add-key-modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function AddKeyModal() {
6464
>
6565
<DialogTrigger asChild>
6666
<Button variant="primary" size="icon-sm">
67-
<PlusIcon className="h-4 w-4" />
67+
<PlusIcon className="size-4" />
6868
</Button>
6969
</DialogTrigger>
7070

packages/react-databrowser/src/components/databrowser/components/display/display-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const DisplayHeader = ({
4040
return (
4141
<div className="rounded-lg bg-zinc-100 px-3 py-2">
4242
<div className="flex min-h-10 items-center justify-between gap-4">
43-
<h2 className="grow truncate">
43+
<h2 className="grow truncate text-base">
4444
{dataKey.trim() === "" ? (
4545
<span className="ml-1 text-zinc-500">(Empty Key)</span>
4646
) : (
@@ -51,7 +51,7 @@ export const DisplayHeader = ({
5151
<div className="flex items-center gap-1">
5252
{type !== "string" && type !== "json" && (
5353
<Button onClick={handleAddItem} size="icon-sm">
54-
<IconPlus className="size-5 text-zinc-500" />
54+
<IconPlus className="size-4 text-zinc-500" />
5555
</Button>
5656
)}
5757

packages/react-databrowser/src/components/databrowser/components/display/key-actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function KeyActions({ dataKey, content }: { dataKey: string; content?: st
1717
<DropdownMenu>
1818
<DropdownMenuTrigger asChild>
1919
<Button size="icon-sm">
20-
<IconDotsVertical className="size-5 text-zinc-500" />
20+
<IconDotsVertical className="size-4 text-zinc-500" />
2121
</Button>
2222
</DropdownMenuTrigger>
2323
<DropdownMenuContent className="" align="end">

packages/react-databrowser/src/components/databrowser/components/display/ttl-popover.tsx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover
77
import {
88
Select,
99
SelectContent,
10-
SelectGroup,
1110
SelectItem,
1211
SelectTrigger,
1312
SelectValue,
@@ -76,11 +75,13 @@ export function TTLPopover({
7675
<PopoverTrigger asChild>
7776
<button>{children}</button>
7877
</PopoverTrigger>
79-
<PopoverContent className="w-[300px]">
78+
79+
<PopoverContent className="w-[300px]" align="end">
8080
<form className="space-y-4" onSubmit={onSubmit}>
8181
<h4 className="font-medium leading-none">Expiration</h4>
82+
8283
<div>
83-
<div className="flex">
84+
<div className="flex items-center">
8485
<Controller
8586
rules={{
8687
required: "Please enter an expiration time",
@@ -89,37 +90,40 @@ export function TTLPopover({
8990
control={control}
9091
name="value"
9192
render={({ field }) => (
92-
<Input min="-1" {...field} className="h-8 grow rounded-r-none" />
93+
<Input min="-1" {...field} className="grow rounded-r-none" />
9394
)}
9495
/>
96+
9597
<Controller
9698
control={control}
9799
name="type"
98100
render={({ field }) => (
99101
<Select value={field.value} onValueChange={field.onChange}>
100-
<SelectTrigger className="h-8 rounded-l-none border-l-0 pl-2 pr-8">
102+
<SelectTrigger className="w-auto rounded-l-none border-l-0 pr-8">
101103
<SelectValue />
102104
</SelectTrigger>
105+
103106
<SelectContent>
104-
<SelectGroup>
105-
{timeUnits.map((unit) => (
106-
<SelectItem key={unit.label} value={unit.label}>
107-
{unit.label}
108-
</SelectItem>
109-
))}
110-
</SelectGroup>
107+
{timeUnits.map((unit) => (
108+
<SelectItem key={unit.label} value={unit.label}>
109+
{unit.label}
110+
</SelectItem>
111+
))}
111112
</SelectContent>
112113
</Select>
113114
)}
114115
/>
115116
</div>
117+
116118
{formState.errors.value && (
117-
<div className="my-1 text-xs text-red-500">{formState.errors.value.message}</div>
119+
<p className="mt-2 text-xs text-red-500">{formState.errors.value.message}</p>
118120
)}
121+
122+
<p className="mt-2 text-xs text-zinc-500">
123+
TTL sets a timer to automatically delete keys after a defined period.
124+
</p>
119125
</div>
120-
<div className="text-xs text-zinc-500">
121-
TTL sets a timer to automatically delete keys after a defined period.
122-
</div>
126+
123127
<div className="flex justify-between">
124128
<Button
125129
disabled={ttl === PERSISTED_KEY}

packages/react-databrowser/src/components/databrowser/components/sidebar/reload-button.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState } from "react"
22
import { ReloadIcon } from "@radix-ui/react-icons"
33

4+
import { cn } from "@/lib/utils"
45
import { Button } from "@/components/ui/button"
56

67
export const ReloadButton = ({
@@ -29,7 +30,7 @@ export const ReloadButton = ({
2930
onClick={handleClick}
3031
disabled={isLoading || isLoadingProp}
3132
>
32-
<ReloadIcon className={isLoading || isLoadingProp ? "animate-spin" : ""} />
33+
<ReloadIcon className={cn("size-4", isLoading || isLoadingProp ? "animate-spin" : "")} />
3334
</Button>
3435
</div>
3536
)

packages/react-databrowser/src/components/databrowser/copy-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function CopyButton({
3030
return (
3131
<Button size={sizeVariant} variant={variant} onClick={handleCopy} className={className}>
3232
{copied ? (
33-
<CheckIcon />
33+
<CheckIcon className="size-4" />
3434
) : (
3535
<svg
3636
width={svgSize?.w ?? 15}

packages/react-databrowser/src/components/ui/dropdown-menu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
3232
{...props}
3333
>
3434
{children}
35-
<ChevronRightIcon className="ml-auto h-4 w-4" />
35+
<ChevronRightIcon className="ml-auto size-4" />
3636
</DropdownMenuPrimitive.SubTrigger>
3737
))
3838
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName
@@ -104,7 +104,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
104104
>
105105
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
106106
<DropdownMenuPrimitive.ItemIndicator>
107-
<CheckIcon className="h-4 w-4" />
107+
<CheckIcon className="size-4" />
108108
</DropdownMenuPrimitive.ItemIndicator>
109109
</span>
110110
{children}
@@ -126,7 +126,7 @@ const DropdownMenuRadioItem = React.forwardRef<
126126
>
127127
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
128128
<DropdownMenuPrimitive.ItemIndicator>
129-
<DotFilledIcon className="h-4 w-4 fill-current" />
129+
<DotFilledIcon className="size-4 fill-current" />
130130
</DropdownMenuPrimitive.ItemIndicator>
131131
</span>
132132
{children}

packages/react-databrowser/src/components/ui/popover.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ const PopoverContent = React.forwardRef<
1717
align={align}
1818
sideOffset={sideOffset}
1919
className={cn(
20-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border border-zinc-200 bg-white p-4 text-zinc-950 shadow-md outline-none dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",
20+
"data-[state=open]:animate-in data-[state=closed]:animate-out " +
21+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 " +
22+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 " +
23+
"data-[side=bottom]:slide-in-from-top-2 " +
24+
"data-[side=left]:slide-in-from-right-2 " +
25+
"data-[side=right]:slide-in-from-left-2 " +
26+
"data-[side=top]:slide-in-from-bottom-2 " +
27+
"z-50 w-72 rounded-md border border-zinc-200 bg-white p-4 " +
28+
"text-zinc-950 shadow-md outline-none dark:border-zinc-800 " +
29+
"mt-0.5 dark:bg-zinc-950 dark:text-zinc-50",
2130
className
2231
)}
2332
{...props}

packages/react-databrowser/src/components/ui/toast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const ToastClose = React.forwardRef<
8080
toast-close=""
8181
{...props}
8282
>
83-
<Cross2Icon className="h-4 w-4" />
83+
<Cross2Icon className="size-4" />
8484
</ToastPrimitives.Close>
8585
))
8686
ToastClose.displayName = ToastPrimitives.Close.displayName

0 commit comments

Comments
 (0)