From 2eff825c6818d2ec87f1e0025f3138ecbb00413a Mon Sep 17 00:00:00 2001 From: DmitriyB Date: Thu, 11 Aug 2022 14:43:45 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20?= =?UTF-8?q?=D1=8F=D0=B7=D1=8B=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainScreen/mobileAddPart/langButton.tsx | 2 +- .../mainScreen/mobileAddPart/mobileAddPart.css | 1 + .../mainScreen/mobileAddPart/settingButtons.tsx | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/mainScreen/mobileAddPart/langButton.tsx b/src/components/mainScreen/mobileAddPart/langButton.tsx index 45361b3..2ee53f1 100644 --- a/src/components/mainScreen/mobileAddPart/langButton.tsx +++ b/src/components/mainScreen/mobileAddPart/langButton.tsx @@ -9,7 +9,7 @@ type TProps = { } export const LangButton:React.FC = React.memo((props) => { - return
+ return
props.onClick()}>
{props.title} {props.caption} diff --git a/src/components/mainScreen/mobileAddPart/mobileAddPart.css b/src/components/mainScreen/mobileAddPart/mobileAddPart.css index 29b4a84..53daa40 100644 --- a/src/components/mainScreen/mobileAddPart/mobileAddPart.css +++ b/src/components/mainScreen/mobileAddPart/mobileAddPart.css @@ -164,6 +164,7 @@ background-color: #4F4F4F; justify-content: space-between; align-items: center; + user-select: none; } .lang-button-container:active { diff --git a/src/components/mainScreen/mobileAddPart/settingButtons.tsx b/src/components/mainScreen/mobileAddPart/settingButtons.tsx index 63a8fcc..d56dabf 100644 --- a/src/components/mainScreen/mobileAddPart/settingButtons.tsx +++ b/src/components/mainScreen/mobileAddPart/settingButtons.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import { SettingButton } from "./settingButton"; import langIcon from './icons/languageIcon.svg'; import shareIcon from './icons/shareIcon.svg'; @@ -15,6 +15,11 @@ type TProps = { } export const SettingButtons:React.FC = React.memo((props) => { + const [currentLang, setCurrentLang] = useState(true); //temp + function changeLang() { + setCurrentLang(!currentLang); + } + return
{ @@ -39,14 +44,16 @@ export const SettingButtons:React.FC = React.memo((props) => { }