[Update] Config Page: Change the design to be natural and behavior smoother.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import clsx from "clsx";
|
||||||
|
|
||||||
import styles from "./Topbar.module.scss";
|
import styles from "./Topbar.module.scss";
|
||||||
import { useIsOpenedConfigPage } from "@store";
|
import { useIsOpenedConfigPage } from "@store";
|
||||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||||
@@ -7,7 +9,7 @@ import { SectionTitleBox } from "./section_title_box/SectionTitleBox";
|
|||||||
import { CompactSwitchBox } from "./compact_switch_box/CompactSwitchBox";
|
import { CompactSwitchBox } from "./compact_switch_box/CompactSwitchBox";
|
||||||
|
|
||||||
export const Topbar = () => {
|
export const Topbar = () => {
|
||||||
const { updateIsOpenedConfigPage } = useIsOpenedConfigPage();
|
const { currentIsOpenedConfigPage, updateIsOpenedConfigPage } = useIsOpenedConfigPage();
|
||||||
const closeConfigPage = () => {
|
const closeConfigPage = () => {
|
||||||
console.log("close");
|
console.log("close");
|
||||||
updateIsOpenedConfigPage(false);
|
updateIsOpenedConfigPage(false);
|
||||||
@@ -15,7 +17,10 @@ export const Topbar = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={clsx(styles.container, {
|
||||||
|
[styles.show_config]: currentIsOpenedConfigPage,
|
||||||
|
[styles.show_main]: !currentIsOpenedConfigPage
|
||||||
|
})}>
|
||||||
<div className={styles.wrapper} onClick={() => closeConfigPage()}>
|
<div className={styles.wrapper} onClick={() => closeConfigPage()}>
|
||||||
<div className={styles.go_back_button}>
|
<div className={styles.go_back_button}>
|
||||||
<ArrowLeftSvg className={styles.arrow_left_svg} />
|
<ArrowLeftSvg className={styles.arrow_left_svg} />
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0%;
|
height: 0%;
|
||||||
// position: sticky;
|
transition: transform 0.5s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show_config.container {
|
||||||
|
transform: translateY(0vh);
|
||||||
|
}
|
||||||
|
|
||||||
|
.show_main.container {
|
||||||
|
transform: translateY(100vh);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
// height: var(--config_page_topbar_height);
|
|
||||||
background-color: var(--dark_850_color);
|
background-color: var(--dark_850_color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// display: flex;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// flex-shrink: 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user