Skip to content

Commit

Permalink
Fix(DropDown): eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
abder committed Oct 13, 2023
1 parent f8554d5 commit cd03503
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/components/dropdown/src/dropdown-menu-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const DropdownMenuItem: FC<DropdownMenuItemProps> = ({
// 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
}
Expand Down
15 changes: 5 additions & 10 deletions packages/components/dropdown/stories/dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className="sui-layout sui-layout--horizontal sui-layout--vertical">
<div className="sui-layout__content">
<div style={set.box}>
<div style={boxStyle}>
<SuiDropdown
{...props}
onMenuClick={(id, e) => {
console.log("DEBUG: Menu Item Clicked", id, e)
}}
menu={[
{
id: "plugin-variants",
Expand Down

0 comments on commit cd03503

Please sign in to comment.