Skip to content

Commit

Permalink
Merge branch 'onboarding' of https://github.com/commonground-project/…
Browse files Browse the repository at this point in the history
…frontend into onboarding
  • Loading branch information
yukicoder0509 committed Nov 29, 2024
2 parents 34a6340 + 4fd9d47 commit 99172b2
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/components/Onboarding/NicknameInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { TextInput } from "@mantine/core";
import { UseFormReturnType } from "@mantine/form";

type NicknameInputProps = {
form: UseFormReturnType<
{
username: string;
nickname: string;
},
(values: { username: string; nickname: string }) => {
username: string;
nickname: string;
}
>;
inputValueName: string;
};

export default function NicknameInput({
form,
inputValueName,
}: NicknameInputProps) {
return (
<TextInput
label="暱稱"
description="我們該如何稱呼您?"
required
{...form.getInputProps(inputValueName)}
key={form.key(inputValueName)}
classNames={{
root: "w-full max-w-[430px] pb-[30px]",
label: "pb-1 text-[16px] font-semibold text-neutral-900",
description: `pb-2 text-[14px] font-normal text-[#868E96]"`,
input: "bg-transparent px-4 py-[6px] text-[16px] font-normal",
}}
/>
);
}
37 changes: 37 additions & 0 deletions src/components/Onboarding/UserNameInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { TextInput } from "@mantine/core";
import { UseFormReturnType } from "@mantine/form";

type UserNameInputProps = {
form: UseFormReturnType<
{
username: string;
nickname: string;
},
(values: { username: string; nickname: string }) => {
username: string;
nickname: string;
}
>;
inputValueName: string;
};

export default function UserNameInput({
form,
inputValueName,
}: UserNameInputProps) {
return (
<TextInput
label="使用者名稱"
description="您在平台上的 ID;請使用英文字母、數字或半形句點、底線與減號"
required
{...form.getInputProps(inputValueName)}
key={form.key(inputValueName)}
classNames={{
root: "w-full max-w-[430px] pb-[30px]",
label: "pb-1 text-[16px] font-semibold text-neutral-900",
description: `pb-2 text-[14px] font-normal text-[#868E96]"`,
input: "bg-transparent px-4 py-[6px] text-[16px] font-normal",
}}
/>
);
}

0 comments on commit 99172b2

Please sign in to comment.