From da1a3adfec3633ffc8aef540bfee228ce291d797 Mon Sep 17 00:00:00 2001 From: Khuda Dad Nomani Date: Tue, 24 Oct 2023 15:01:06 +0100 Subject: [PATCH] fix sonar errors --- .../src/components/IconButton.stories.tsx | 1 - packages/ui/components/Form/Form.tsx | 2 - .../ui/components/Form/Inputs/Dropdown.tsx | 77 +++++++++---------- 3 files changed, 36 insertions(+), 44 deletions(-) diff --git a/apps/design-system/src/components/IconButton.stories.tsx b/apps/design-system/src/components/IconButton.stories.tsx index f4a40a251..c99d554ea 100644 --- a/apps/design-system/src/components/IconButton.stories.tsx +++ b/apps/design-system/src/components/IconButton.stories.tsx @@ -1,4 +1,3 @@ -import { FunctionComponent } from 'react'; import { Meta } from '@storybook/react'; import { IconButton } from '@asyncapi/studio-ui'; import { AddIcon } from '@asyncapi/studio-ui/icons'; diff --git a/packages/ui/components/Form/Form.tsx b/packages/ui/components/Form/Form.tsx index b2886a6f3..c71f705bf 100644 --- a/packages/ui/components/Form/Form.tsx +++ b/packages/ui/components/Form/Form.tsx @@ -4,8 +4,6 @@ import * as RadixForm from '@radix-ui/react-form' export type FormProps = { className?: string title?: string - summary?: string - description?: string children?: React.ReactNode } export const Form = ({ className, title, children }: FormProps) => ( diff --git a/packages/ui/components/Form/Inputs/Dropdown.tsx b/packages/ui/components/Form/Inputs/Dropdown.tsx index 55256eb00..514ddaf2f 100644 --- a/packages/ui/components/Form/Inputs/Dropdown.tsx +++ b/packages/ui/components/Form/Inputs/Dropdown.tsx @@ -38,14 +38,12 @@ type DropdownGroupOptionProps = { const DropdownGroupOption = ({ option: { label, options } }: DropdownGroupOptionProps) => { return ( - <> - - {label} - {options.map((option) => ( - - ))} - - + + {label} + {options.map((option) => ( + + ))} + ) } type DropdownSeparatorOption = { @@ -80,7 +78,6 @@ export type DropdownProps = { placeholder?: string isDisabled?: boolean name?: string - label?: string className?: string } @@ -94,37 +91,35 @@ export function Dropdown({ className, }: DropdownProps) { return ( - <> - - - - - - - - - - - - - - {options.map((option, index) => ( - - ))} - - - - - - - - + + + + + + + + + + + + + + {options.map((option, index) => ( + + ))} + + + + + + + ) }