[Refactor] Introduce wrapper component for DropdownMenu to enhance versatility.
This commit is contained in:
@@ -3,7 +3,7 @@ import clsx from "clsx";
|
|||||||
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
import ArrowLeftSvg from "@images/arrow_left.svg?react";
|
||||||
import { useStore_IsOpenedDropdownMenu } from "@store";
|
import { useStore_IsOpenedDropdownMenu } from "@store";
|
||||||
|
|
||||||
export const DropdownMenu = (props) => {
|
export const _DropdownMenu = (props) => {
|
||||||
const { updateIsOpenedDropdownMenu, currentIsOpenedDropdownMenu } = useStore_IsOpenedDropdownMenu();
|
const { updateIsOpenedDropdownMenu, currentIsOpenedDropdownMenu } = useStore_IsOpenedDropdownMenu();
|
||||||
|
|
||||||
const toggleDropdownMenu = () => {
|
const toggleDropdownMenu = () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import styles from "./ComputeDevice.module.scss";
|
import styles from "./ComputeDevice.module.scss";
|
||||||
import { DropdownMenu } from "../_atoms/_dropdown_menu/_DropdownMenu";
|
import { DropdownMenu } from "../dropdown_menu/DropdownMenu";
|
||||||
import { ActionButton } from "../action_button/ActionButton";
|
import { ActionButton } from "../action_button/ActionButton";
|
||||||
import HelpSvg from "@images/help.svg?react";
|
import HelpSvg from "@images/help.svg?react";
|
||||||
import { useStore_OpenedQuickSetting } from "@store"
|
import { useStore_OpenedQuickSetting } from "@store"
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import styles from "./DropdownMenu.module.scss";
|
||||||
|
import { _DropdownMenu } from "../_atoms/_dropdown_menu/_DropdownMenu";
|
||||||
|
|
||||||
|
export const DropdownMenu = (props) => {
|
||||||
|
return (
|
||||||
|
<div className={styles.container}>
|
||||||
|
<_DropdownMenu {...props} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@import "@scss_mixins";
|
||||||
|
|
||||||
|
// .container {
|
||||||
|
// position: relative;
|
||||||
|
// }
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
export { ActionButton } from "./action_button/ActionButton";
|
export { ActionButton } from "./action_button/ActionButton";
|
||||||
export { ComputeDevice } from "./compute_device/ComputeDevice";
|
export { ComputeDevice } from "./compute_device/ComputeDevice";
|
||||||
export { DeeplAuthKey, OpenWebpage_DeeplAuthKey } from "./deepl_auth_key/DeeplAuthKey";
|
export { DeeplAuthKey, OpenWebpage_DeeplAuthKey } from "./deepl_auth_key/DeeplAuthKey";
|
||||||
export { DropdownMenu } from "./_atoms/_dropdown_menu/_DropdownMenu";
|
export { DropdownMenu } from "./dropdown_menu/DropdownMenu";
|
||||||
export { Entry } from "./entry/Entry";
|
export { Entry } from "./entry/Entry";
|
||||||
export { EntryWithSaveButton } from "./entry_with_save_button/EntryWithSaveButton";
|
export { EntryWithSaveButton } from "./entry_with_save_button/EntryWithSaveButton";
|
||||||
export { HotkeysEntry } from "./hotkeys_entry/HotkeysEntry";
|
export { HotkeysEntry } from "./hotkeys_entry/HotkeysEntry";
|
||||||
|
|||||||
Reference in New Issue
Block a user