refactor: menu component props and toolbar menu item colors [skip e2e]
This commit is contained in:
@@ -83,7 +83,6 @@ const ChangeEditorButton: FunctionComponent<Props> = ({ noteViewController, onCl
|
||||
>
|
||||
<ChangeEditorMenu
|
||||
application={application}
|
||||
isVisible={isOpen}
|
||||
note={note}
|
||||
setDisableClickOutside={setIsClickOutsideDisabled}
|
||||
closeMenu={() => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user