Migrate to twenty-ui - navigation/menu-item (#8213)
This PR was created by [GitStart](https://gitstart.com/) to address the requirements from this ticket: [TWNTY-7536](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7536). --- ### Description Migrate all menu items components to twenty ui and update imports. ```typescript MenuItem MenuItemAvata MenuItemCommand MenuItemCommandHotKeys MenuItemDraggable MenuItemMultiSelect MenuItemMultiSelectAvatar MenuItemMultiSelectTag MenuItemNavigate MenuItemSelect MenuItemSelectAvatar MenuItemSelectColor MenuItemSelectTag MenuItemSuggestion MenuItemToggle ``` \ Also migrate all other dependent components and utilities like `Checkbox` & `Toggle`\ \ Fixes twentyhq/private-issues#82 --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f9a136ab6d
commit
6264d509bd
@ -8,6 +8,7 @@ export * from './color/utils/stringToHslColor';
|
||||
export * from './dimensions/components/ComputeNodeDimensions';
|
||||
export * from './image/getImageAbsoluteURI';
|
||||
export * from './isDefined';
|
||||
export * from './responsive/hooks/useIsMobile';
|
||||
export * from './screen-size/hooks/useScreenSize';
|
||||
export * from './state/utils/createState';
|
||||
export * from './types/Nullable';
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
import { renderHook } from '@testing-library/react';
|
||||
import { useIsMobile } from '@ui/utilities/responsive/hooks/useIsMobile';
|
||||
|
||||
describe('useIsMobile', () => {
|
||||
it('should trigger the callback when clicking outside the specified refs', () => {
|
||||
const { result } = renderHook(() => useIsMobile());
|
||||
|
||||
expect(result.current).toBe(false);
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,5 @@
|
||||
import { MOBILE_VIEWPORT } from '@ui/theme';
|
||||
import { useMediaQuery } from 'react-responsive';
|
||||
|
||||
export const useIsMobile = () =>
|
||||
useMediaQuery({ query: `(max-width: ${MOBILE_VIEWPORT}px)` });
|
||||
Reference in New Issue
Block a user