From d1e1b20e53a223048d2737a876bb779602dde3ea Mon Sep 17 00:00:00 2001 From: DmitriyB Date: Fri, 29 Jul 2022 18:27: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=D1=8B=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BA=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82,=20=D0=BD=D0=B0=D0=BF?= =?UTF-8?q?=D0=B8=D1=81=D0=B0=D0=BD=D1=8B=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D1=82=D1=8B=20=D1=82=D1=83=D0=BB=D0=B1=D0=B0?= =?UTF-8?q?=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainScreen/toolbar/buttonContainer.tsx | 16 ++++++ .../toolbar/icons/controlDisabledIcon.svg | 5 ++ .../toolbar/icons/disableFullscreenIcon.svg | 4 ++ .../mainScreen/toolbar/icons/exitIcon.svg | 4 ++ .../toolbar/icons/microDisabledIcon.svg | 5 ++ .../mainScreen/toolbar/icons/shareIcon.svg | 4 ++ .../mainScreen/toolbar/icons/userIcon.svg | 4 ++ src/components/mainScreen/toolbar/toolbar.css | 16 +++++- src/components/mainScreen/toolbar/toolbar.tsx | 55 ++++++++++++++++++- .../mainScreen/toolbar/toolbarButton.tsx | 11 ++++ .../toolbarButtonContainerBorderLine.tsx | 5 ++ .../mainScreen/toolbar/typeButtons.ts | 11 ++++ 12 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 src/components/mainScreen/toolbar/buttonContainer.tsx create mode 100644 src/components/mainScreen/toolbar/icons/controlDisabledIcon.svg create mode 100644 src/components/mainScreen/toolbar/icons/disableFullscreenIcon.svg create mode 100644 src/components/mainScreen/toolbar/icons/exitIcon.svg create mode 100644 src/components/mainScreen/toolbar/icons/microDisabledIcon.svg create mode 100644 src/components/mainScreen/toolbar/icons/shareIcon.svg create mode 100644 src/components/mainScreen/toolbar/icons/userIcon.svg create mode 100644 src/components/mainScreen/toolbar/toolbarButton.tsx create mode 100644 src/components/mainScreen/toolbar/toolbarButtonContainerBorderLine.tsx create mode 100644 src/components/mainScreen/toolbar/typeButtons.ts diff --git a/src/components/mainScreen/toolbar/buttonContainer.tsx b/src/components/mainScreen/toolbar/buttonContainer.tsx new file mode 100644 index 0000000..379efae --- /dev/null +++ b/src/components/mainScreen/toolbar/buttonContainer.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import { ToolbarButton } from "./toolbarButton"; +import { BorderLine } from "./toolbarButtonContainerBorderLine"; +import { TypeToolbarButtons } from "./typeButtons"; + +type TProps = { + buttons: Array<{type: TypeToolbarButtons, onClick: () => void}> +} + +export const ButtonContainer:React.FC = React.memo((props) => { + return
+ + {props.buttons.map(button => )} + +
+}) \ No newline at end of file diff --git a/src/components/mainScreen/toolbar/icons/controlDisabledIcon.svg b/src/components/mainScreen/toolbar/icons/controlDisabledIcon.svg new file mode 100644 index 0000000..5ba4613 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/controlDisabledIcon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/mainScreen/toolbar/icons/disableFullscreenIcon.svg b/src/components/mainScreen/toolbar/icons/disableFullscreenIcon.svg new file mode 100644 index 0000000..8f81515 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/disableFullscreenIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/mainScreen/toolbar/icons/exitIcon.svg b/src/components/mainScreen/toolbar/icons/exitIcon.svg new file mode 100644 index 0000000..512ae72 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/exitIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/mainScreen/toolbar/icons/microDisabledIcon.svg b/src/components/mainScreen/toolbar/icons/microDisabledIcon.svg new file mode 100644 index 0000000..fab1bc1 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/microDisabledIcon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/mainScreen/toolbar/icons/shareIcon.svg b/src/components/mainScreen/toolbar/icons/shareIcon.svg new file mode 100644 index 0000000..0664766 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/shareIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/mainScreen/toolbar/icons/userIcon.svg b/src/components/mainScreen/toolbar/icons/userIcon.svg new file mode 100644 index 0000000..7de10f4 --- /dev/null +++ b/src/components/mainScreen/toolbar/icons/userIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/mainScreen/toolbar/toolbar.css b/src/components/mainScreen/toolbar/toolbar.css index 471a851..008e9c0 100644 --- a/src/components/mainScreen/toolbar/toolbar.css +++ b/src/components/mainScreen/toolbar/toolbar.css @@ -2,9 +2,13 @@ display: flex; position: relative; height: 100%; - width: 94px; - + width: 74px; + padding: 0; + margin: 0; transform: translateX(-70px); + + border-right: 1px solid #4F4F4F; + background: #333333; } /* .toolbar-container.closed { @@ -18,16 +22,22 @@ .toolbar-field { width: 70px; background: #333333; + padding: 14px 15px; + box-sizing: border-box; + /* border-right: 1px solid red; */ } .toolbar-open-button { + position: absolute; + top: calc((100% - 128px) / 2); + left: calc(100% - 5px); display: flex; justify-content: center; align-items: center; margin-top: auto; margin-bottom: auto; - margin-left: auto; + width: 24px; height: 128px; border: none; diff --git a/src/components/mainScreen/toolbar/toolbar.tsx b/src/components/mainScreen/toolbar/toolbar.tsx index 2d2b922..924fc05 100644 --- a/src/components/mainScreen/toolbar/toolbar.tsx +++ b/src/components/mainScreen/toolbar/toolbar.tsx @@ -1,5 +1,7 @@ import React from "react"; +import { ButtonContainer } from "./buttonContainer"; import './toolbar.css'; +import { ToolbarButton } from "./toolbarButton"; type TProps = { onClickOpenButton: () => void @@ -9,7 +11,58 @@ type TProps = { export const Toolbar:React.FC = React.memo((props) => { return
- +
+ null} + /> + console.log('click') + }, + { + type: "user", + onClick: () => console.log('click') + }, + { + type: "user", + onClick: () => console.log('click') + }, + { + type: "user", + onClick: () => console.log('click') + } + ]} + /> +
+
+ console.log('click') + }, + { + type: "micro", + onClick: () => console.log('click') + } + ]} + /> + console.log('click') + } + ]} + /> + null} + /> +
+}) \ No newline at end of file diff --git a/src/components/mainScreen/toolbar/toolbarButtonContainerBorderLine.tsx b/src/components/mainScreen/toolbar/toolbarButtonContainerBorderLine.tsx new file mode 100644 index 0000000..8341145 --- /dev/null +++ b/src/components/mainScreen/toolbar/toolbarButtonContainerBorderLine.tsx @@ -0,0 +1,5 @@ +import React from "react"; + +export const BorderLine:React.FC = React.memo(() => { + return +}) \ No newline at end of file diff --git a/src/components/mainScreen/toolbar/typeButtons.ts b/src/components/mainScreen/toolbar/typeButtons.ts new file mode 100644 index 0000000..4634fcc --- /dev/null +++ b/src/components/mainScreen/toolbar/typeButtons.ts @@ -0,0 +1,11 @@ +export type TypeToolbarButtons = + 'fullscreen' + | 'user' + | 'userse' + | 'micro' + | 'control' + | 'other' + | 'sound' + | 'exit' + | 'copy' + | 'share' \ No newline at end of file