From cd035037d5bc3b0db9c716d605d19460fc502809 Mon Sep 17 00:00:00 2001 From: douara Date: Fri, 13 Oct 2023 19:50:20 +0800 Subject: [PATCH] Fix(DropDown): eslint --- .../dropdown/src/dropdown-menu-item.tsx | 1 + .../dropdown/stories/dropdown.stories.tsx | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/components/dropdown/src/dropdown-menu-item.tsx b/packages/components/dropdown/src/dropdown-menu-item.tsx index 31ed2bf07..335834f0b 100644 --- a/packages/components/dropdown/src/dropdown-menu-item.tsx +++ b/packages/components/dropdown/src/dropdown-menu-item.tsx @@ -48,6 +48,7 @@ const DropdownMenuItem: FC = ({ // Check if an icon is specified and assign it to IconTag let IconTag = null if (!isEmpty(icon ?? "")) { + /*eslint import/namespace: ['error', { allowComputed: true }]*/ // @ts-ignore IconTag = Icons?.[icon] ?? null } diff --git a/packages/components/dropdown/stories/dropdown.stories.tsx b/packages/components/dropdown/stories/dropdown.stories.tsx index 693f7b67a..ac7a5c09a 100644 --- a/packages/components/dropdown/stories/dropdown.stories.tsx +++ b/packages/components/dropdown/stories/dropdown.stories.tsx @@ -20,26 +20,21 @@ export default { } // Build story -export const Dropdown = ({ example, ...props }) => { - const set = {} - - set.box = { +export const Dropdown = ({ color, ...props }: { color: string }) => { + const boxStyle = { margin: 0, padding: "30px", - border: "white" === props.color ? "1px solid #E6E6E6" : 0, + border: "white" === color ? "1px solid #E6E6E6" : 0, borderRadius: "4px", - background: "white" === props.color ? "#333" : "#fff", + background: "white" === color ? "#333" : "#fff", } return (
-
+
{ - console.log("DEBUG: Menu Item Clicked", id, e) - }} menu={[ { id: "plugin-variants",