Skip to content

Commit 6470f5a

Browse files
committed
feat: refactor several components and clean up ui
1 parent a53fd31 commit 6470f5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1522
-1355
lines changed

app/assets/android.svg

Lines changed: 3 additions & 0 deletions
Loading

app/assets/ios.svg

Lines changed: 3 additions & 0 deletions
Loading

app/assets/linux.svg

Lines changed: 3 additions & 0 deletions
Loading

app/assets/macos.svg

Lines changed: 3 additions & 0 deletions
Loading

app/assets/windows.svg

Lines changed: 3 additions & 0 deletions
Loading

app/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function Button({ variant = "light", ...props }: ButtonProps) {
2020
ref={ref}
2121
{...buttonProps}
2222
className={cn(
23-
"w-fit rounded-lg px-3.5 py-2 text-sm leading-tight",
23+
"w-fit rounded-md px-3.5 py-2 text-sm leading-tight",
2424
"transition-colors duration-100",
2525
"focus:outline-hidden focus:ring-2 focus:ring-indigo-500/40 focus:ring-offset-1",
2626
"dark:focus:ring-indigo-400/40 dark:focus:ring-offset-mist-900",

app/components/Dialog.tsx

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
} from "react-stately";
1616

1717
import Button, { ButtonProps } from "~/components/Button";
18-
import Card from "~/components/Card";
1918
import IconButton, { IconButtonProps } from "~/components/IconButton";
2019
import Text from "~/components/Text";
2120
import Title from "~/components/Title";
@@ -101,7 +100,13 @@ function Panel(props: DialogPanelProps) {
101100
return (
102101
<Form
103102
{...dialogProps}
104-
className={cn("outline-hidden rounded-lg w-full max-w-lg", "bg-white dark:bg-mist-900")}
103+
className={cn(
104+
"w-full max-w-lg rounded-xl p-4",
105+
"outline-hidden",
106+
"bg-white dark:bg-mist-900",
107+
"border border-mist-200 dark:border-mist-800",
108+
"shadow-overlay",
109+
)}
105110
method={method ?? "POST"}
106111
onSubmit={(event) => {
107112
if (onSubmit) {
@@ -112,25 +117,23 @@ function Panel(props: DialogPanelProps) {
112117
}}
113118
ref={ref}
114119
>
115-
<Card className="w-full max-w-lg" variant="flat">
116-
{children}
117-
<div className="mt-6 flex justify-end gap-4">
118-
{variant === "unactionable" ? (
119-
<Button onPress={close}>Close</Button>
120-
) : (
121-
<>
122-
<Button onPress={close}>Cancel</Button>
123-
<Button
124-
isDisabled={isDisabled}
125-
type="submit"
126-
variant={variant === "destructive" ? "danger" : "heavy"}
127-
>
128-
Confirm
129-
</Button>
130-
</>
131-
)}
132-
</div>
133-
</Card>
120+
<div className="flex flex-col gap-4">{children}</div>
121+
<div className="mt-5 flex justify-end gap-3">
122+
{variant === "unactionable" ? (
123+
<Button onPress={close}>Close</Button>
124+
) : (
125+
<>
126+
<Button onPress={close}>Cancel</Button>
127+
<Button
128+
isDisabled={isDisabled}
129+
type="submit"
130+
variant={variant === "destructive" ? "danger" : "heavy"}
131+
>
132+
Confirm
133+
</Button>
134+
</>
135+
)}
136+
</div>
134137
</Form>
135138
);
136139
}
@@ -155,17 +158,20 @@ function DModal(props: DModalProps) {
155158
{...underlayProps}
156159
aria-hidden="true"
157160
className={cn(
158-
"fixed inset-0 h-screen w-screen z-20",
161+
"fixed inset-0 z-20 h-screen w-screen",
159162
"flex items-center justify-center",
160-
"bg-mist-900/15 dark:bg-mist-900/30",
163+
"bg-mist-900/30 dark:bg-mist-950/60",
161164
"entering:animate-in exiting:animate-out",
162165
"entering:fade-in entering:duration-100 entering:ease-out",
163166
"exiting:fade-out exiting:duration-50 exiting:ease-in",
164167
)}
165168
/>
166169
<div
167170
{...modalProps}
168-
className={cn("fixed inset-0 h-screen w-screen z-20", "flex items-center justify-center")}
171+
className={cn(
172+
"fixed inset-0 z-20 h-screen w-screen",
173+
"flex items-center justify-center p-4",
174+
)}
169175
>
170176
{children}
171177
</div>

app/components/Footer.tsx

Lines changed: 0 additions & 68 deletions
This file was deleted.

app/components/Header.tsx

Lines changed: 0 additions & 165 deletions
This file was deleted.

app/components/Logo.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)