fix: notes list options menu size regression (#910)
* feat: add new utility class * fix: notes list options menu sizing * fix: remove unnecessary class * feat: remove unnecessary class
This commit is contained in:
@@ -16,10 +16,6 @@ type Props = {
|
|||||||
|
|
||||||
export const NotesListOptionsMenu: FunctionComponent<Props> = observer(
|
export const NotesListOptionsMenu: FunctionComponent<Props> = observer(
|
||||||
({ closeDisplayOptionsMenu, closeOnBlur, application, isOpen }) => {
|
({ closeDisplayOptionsMenu, closeOnBlur, application, isOpen }) => {
|
||||||
const menuClassName =
|
|
||||||
'sn-dropdown sn-dropdown--animated min-w-70 overflow-y-auto \
|
|
||||||
border-1 border-solid border-main text-sm z-index-dropdown-menu \
|
|
||||||
flex flex-col py-2 top-full bottom-0 left-2 absolute';
|
|
||||||
const [sortBy, setSortBy] = useState(() =>
|
const [sortBy, setSortBy] = useState(() =>
|
||||||
application.getPreference(PrefKey.SortNotesBy, CollectionSort.CreatedAt)
|
application.getPreference(PrefKey.SortNotesBy, CollectionSort.CreatedAt)
|
||||||
);
|
);
|
||||||
@@ -117,11 +113,13 @@ flex flex-col py-2 top-full bottom-0 left-2 absolute';
|
|||||||
application.setPreference(PrefKey.NotesHideEditorIcon, !hideEditorIcon);
|
application.setPreference(PrefKey.NotesHideEditorIcon, !hideEditorIcon);
|
||||||
};
|
};
|
||||||
|
|
||||||
const menuRef = useRef<HTMLDivElement>(null);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={menuRef} className={menuClassName}>
|
|
||||||
<Menu
|
<Menu
|
||||||
|
className={
|
||||||
|
'sn-dropdown sn-dropdown--animated min-w-70 max-h-120 overflow-y-auto \
|
||||||
|
border-1 border-solid border-main text-sm z-index-dropdown-menu \
|
||||||
|
flex flex-col py-2 top-full left-2 absolute'
|
||||||
|
}
|
||||||
a11yLabel="Notes list options menu"
|
a11yLabel="Notes list options menu"
|
||||||
closeMenu={closeDisplayOptionsMenu}
|
closeMenu={closeDisplayOptionsMenu}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@@ -264,7 +262,6 @@ flex flex-col py-2 top-full bottom-0 left-2 absolute';
|
|||||||
Show trashed notes
|
Show trashed notes
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user