summaryrefslogtreecommitdiff
path: root/src/components/settings
diff options
context:
space:
mode:
authorl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-21 13:33:46 +0300
committerl3wdfut4pwr <l3wdfut4pwr@gmail.com>2026-04-21 13:33:46 +0300
commitc7d2526afec5ffb8918c20d7c1c58852f1c647bd (patch)
tree476fa2241c0febfcb353f61c4bfecf462b6a359f /src/components/settings
parent8b2f7f4cbf7a59cc6c600299df1b1f67fccae93b (diff)
minor profile changes
Diffstat (limited to 'src/components/settings')
-rw-r--r--src/components/settings/AboutMe.tsx36
-rw-r--r--src/components/settings/ProfilePage.tsx30
2 files changed, 59 insertions, 7 deletions
diff --git a/src/components/settings/AboutMe.tsx b/src/components/settings/AboutMe.tsx
new file mode 100644
index 0000000..b065a26
--- /dev/null
+++ b/src/components/settings/AboutMe.tsx
@@ -0,0 +1,36 @@
+import { useState } from 'react';
+
+export default function AboutMe() {
+ const maxLength = 250;
+ const [text, setText] = useState('');
+
+ const handleChange = (e) => {
+ const value = e.target.value;
+
+ if (value.length <= maxLength) {
+ setText(value);
+ }
+ };
+
+ return (
+ <div className="flex flex-col flex-start gap-[10px] w-[600px] h-[284px]">
+ <p className="font-medium text-light-violet gap-[10px] ml-[20px]">
+ ОБО МНЕ
+ </p>
+
+ <div className="flex flex-row flex-end p-[20px] w-[600px] h-[120px] border-solid border-[1px] rounded-[20px]">
+ <Input
+ value={text}
+ onChange={handleChange}
+ placeholder="Введите описание о себе"
+ />
+
+ <p className="font-regular flex flex-row justify-center items-end ml-[10px] text-light-violet">
+ {maxLength - text.length}
+ </p>
+ </div>
+
+ <Button className="w-[105px]">Сменить</Button>
+ </div>
+ );
+}
diff --git a/src/components/settings/ProfilePage.tsx b/src/components/settings/ProfilePage.tsx
index 9d5b81b..cac8e7e 100644
--- a/src/components/settings/ProfilePage.tsx
+++ b/src/components/settings/ProfilePage.tsx
@@ -1,9 +1,10 @@
import { InputField } from '@/components/ui/inputfield';
-import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui';
import { Separator } from '@/components/ui';
-
+import { useState } from 'react';
export default function ProfilePage() {
+ const maxLength = 250;
+ const [about, setAbout] = useState('');
return (
<div className="flex flex-col flex-start gap-[20px] w-[900px] h-[804px]">
<div className="flex flex-col flex-start gap-[10px] w-[310px] h-[123px]">
@@ -16,14 +17,29 @@ export default function ProfilePage() {
<p className="font-medium text-light-violet gap-[10px] ml-[20px]">
ОБО МНЕ
</p>
- <div className="flex flex-row flex-end p-[20px] w-[600px] h-[120px] border-solid border-[1px] rounded-[20px]">
- <Input placeholder="Введите описание о себе" />
- <p className="font-regular flex flex-row justify-center items-end ml-[10px] text-light-violet">
- 250
+
+ <div className="flex flex-row p-[20px] w-[600px] h-[120px] border-solid border-[1px] rounded-[20px]">
+ <textarea
+ value={about}
+ onChange={(e) => setAbout(e.target.value)}
+ maxLength={maxLength}
+ placeholder="Введите описание о себе"
+ className="w-full h-full resize-none outline-none bg-transparent"
+ />
+
+ <p
+ className={`ml-[10px] flex items-end ${
+ maxLength - about.length <= 10
+ ? 'text-red'
+ : 'text-light-violet'
+ }`}
+ >
+ {maxLength - about.length}
</p>
</div>
+
<Button className="w-[105px]">Сменить</Button>
- </div>
+ </div>{' '}
<Separator className="bg-violet/50 h-[1px]" />
<div className="flex flex-col flex-start gap-[10px] w-[219px] h-[74px]">
<p className="font-medium text-light-violet ml-[20px]">