refactor: menu component props and toolbar menu item colors [skip e2e]

This commit is contained in:
Aman Harwara
2023-10-25 20:29:08 +05:30
parent cbc93fea13
commit 9e784d0c1c
31 changed files with 34 additions and 54 deletions

View File

@@ -83,7 +83,6 @@ const ChangeEditorButton: FunctionComponent<Props> = ({ noteViewController, onCl
>
<ChangeEditorMenu
application={application}
isVisible={isOpen}
note={note}
setDisableClickOutside={setIsClickOutsideDisabled}
closeMenu={() => {

View File

@@ -29,7 +29,6 @@ import MenuSection from '../Menu/MenuSection'
type ChangeEditorMenuProps = {
application: WebApplication
closeMenu: () => void
isVisible: boolean
note: SNNote | undefined
onSelect?: (component: UIFeature<EditorFeatureDescription | IframeComponentFeatureDescription>) => void
setDisableClickOutside?: (value: boolean) => void
@@ -40,7 +39,6 @@ const getGroupId = (group: EditorMenuGroup) => group.title.toLowerCase().replace
const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
application,
closeMenu,
isVisible,
note,
onSelect,
setDisableClickOutside,
@@ -208,7 +206,7 @@ const ChangeEditorMenu: FunctionComponent<ChangeEditorMenuProps> = ({
return (
<>
<Menu className="pb-1 pt-0.5" a11yLabel="Change note type menu" isOpen={isVisible}>
<Menu className="pb-1 pt-0.5" a11yLabel="Change note type menu">
{groups
.filter((group) => group.items && group.items.length)
.map((group) => {

View File

@@ -132,7 +132,7 @@ const ChangeEditorMultipleMenu = ({ application, notes, setDisableClickOutside }
return (
<>
<Menu isOpen={true} a11yLabel="Change note type">
<Menu a11yLabel="Change note type">
{groupsWithItems.map((group) => (
<MenuSection key={getGroupId(group)}>
{group.items.map((item) => {