Skip to content

Commit 606924b

Browse files
committed
chore: unify form styles
1 parent f9e07a2 commit 606924b

23 files changed

+50
-75
lines changed

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@matejmazur/react-katex": "^3.1.3",
1717
"@mui/joy": "5.0.0-beta.51",
1818
"@radix-ui/react-popover": "^1.1.6",
19-
"@usememos/mui": "0.1.0-20250513152542",
19+
"@usememos/mui": "0.1.0-20250515140125",
2020
"clsx": "^2.1.1",
2121
"copy-to-clipboard": "^3.3.3",
2222
"dayjs": "^1.11.13",
@@ -83,4 +83,4 @@
8383
"esbuild"
8484
]
8585
}
86-
}
86+
}

web/pnpm-lock.yaml

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/src/components/ChangeMemberPasswordDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const ChangeMemberPasswordDialog: React.FC<Props> = (props: Props) => {
6969
<p>
7070
{t("setting.account-section.change-password")} ({user.nickname})
7171
</p>
72-
<Button size="sm" variant="plain" onClick={handleCloseBtnClick}>
72+
<Button variant="plain" onClick={handleCloseBtnClick}>
7373
<XIcon className="w-5 h-auto" />
7474
</Button>
7575
</div>

web/src/components/CreateAccessTokenDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
8787
<div className="max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg">
8888
<div className="flex flex-row justify-between items-center w-full mb-4 gap-2">
8989
<p>{t("setting.access-token-section.create-dialog.create-access-token")}</p>
90-
<Button size="sm" variant="plain" onClick={() => destroy()}>
90+
<Button variant="plain" onClick={() => destroy()}>
9191
<XIcon className="w-5 h-auto" />
9292
</Button>
9393
</div>

web/src/components/CreateIdentityProviderDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
245245
<div className="max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg">
246246
<div className="flex flex-row justify-between items-center mb-4 gap-2 w-full">
247247
<p>{t(isCreating ? "setting.sso-section.create-sso" : "setting.sso-section.update-sso")}</p>
248-
<Button size="sm" variant="plain" onClick={handleCloseBtnClick}>
248+
<Button variant="plain" onClick={handleCloseBtnClick}>
249249
<XIcon className="w-5 h-auto" />
250250
</Button>
251251
</div>

web/src/components/CreateShortcutDialog.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Input, Textarea } from "@mui/joy";
2-
import { Button } from "@usememos/mui";
1+
import { Input, Textarea, Button } from "@usememos/mui";
32
import { XIcon } from "lucide-react";
43
import React, { useState } from "react";
54
import { toast } from "react-hot-toast";
@@ -65,7 +64,7 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
6564
<div className="max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg">
6665
<div className="flex flex-row justify-between items-center mb-4 gap-2 w-full">
6766
<p className="title-text">{`${isCreating ? t("common.create") : t("common.edit")} ${t("common.shortcuts")}`}</p>
68-
<Button size="sm" variant="plain" onClick={() => destroy()}>
67+
<Button variant="plain" onClick={() => destroy()}>
6968
<XIcon className="w-5 h-auto" />
7069
</Button>
7170
</div>
@@ -75,10 +74,8 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
7574
<Input className="w-full" type="text" placeholder="" value={shortcut.title} onChange={onShortcutTitleChange} />
7675
<span className="text-sm whitespace-nowrap mt-3 mb-1">{t("common.filter")}</span>
7776
<Textarea
78-
className="w-full"
79-
minRows={3}
80-
maxRows={5}
81-
size="sm"
77+
rows={3}
78+
fullWidth
8279
placeholder={t("common.shortcut-filter")}
8380
value={shortcut.filter}
8481
onChange={onShortcutFilterChange}

web/src/components/CreateUserDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const CreateUserDialog: React.FC<Props> = (props: Props) => {
6666
<div className="max-w-full shadow flex flex-col justify-start items-start bg-white dark:bg-zinc-800 dark:text-gray-300 p-4 rounded-lg">
6767
<div className="flex flex-row justify-between items-center mb-4 gap-2 w-full">
6868
<p className="title-text">{`${isCreating ? t("common.create") : t("common.edit")} ${t("common.user")}`}</p>
69-
<Button size="sm" variant="plain" onClick={() => destroy()}>
69+
<Button variant="plain" onClick={() => destroy()}>
7070
<XIcon className="w-5 h-auto" />
7171
</Button>
7272
</div>

web/src/components/CreateWebhookDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const CreateWebhookDialog: React.FC<Props> = (props: Props) => {
9898
<p className="title-text">
9999
{isCreating ? t("setting.webhook-section.create-dialog.create-webhook") : t("setting.webhook-section.create-dialog.edit-webhook")}
100100
</p>
101-
<Button size="sm" variant="plain" onClick={() => destroy()}>
101+
<Button variant="plain" onClick={() => destroy()}>
102102
<XIcon className="w-5 h-auto" />
103103
</Button>
104104
</div>

web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ const AddMemoRelationPopover = (props: Props) => {
129129

130130
return (
131131
<Popover open={popoverOpen} onOpenChange={setPopoverOpen}>
132-
<PopoverTrigger className="w-9 relative">
133-
<Button className="flex items-center justify-center" size="sm" variant="plain" asChild>
132+
<PopoverTrigger className="relative">
133+
<Button className="flex items-center justify-center p-0" variant="plain" asChild>
134134
<LinkIcon className="w-5 h-5 mx-auto p-0" />
135135
</Button>
136136
</PopoverTrigger>
@@ -174,7 +174,7 @@ const AddMemoRelationPopover = (props: Props) => {
174174
/>
175175
<div className="mt-2 w-full flex flex-row justify-end items-center gap-2">
176176
<Checkbox size="sm" label={"Embed"} checked={embedded} onChange={(e) => setEmbedded(e.target.checked)} />
177-
<Button size="sm" color="primary" onClick={addMemoRelations} disabled={selectedMemos.length === 0}>
177+
<Button color="primary" onClick={addMemoRelations} disabled={selectedMemos.length === 0}>
178178
{t("common.add")}
179179
</Button>
180180
</div>

web/src/components/MemoEditor/ActionButton/LocationSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const LocationSelector = (props: Props) => {
9494
return (
9595
<Popover open={popoverOpen} onOpenChange={setPopoverOpen}>
9696
<PopoverTrigger asChild>
97-
<Button className="flex items-center justify-center" size="sm" variant="plain">
97+
<Button className="flex items-center justify-center p-0" size="sm" variant="plain">
9898
<MapPinIcon className="w-5 h-5 mx-auto shrink-0" />
9999
{props.location && (
100100
<>

0 commit comments

Comments
 (0)