2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-09 21:30:54 +00:00

fix types

This commit is contained in:
Matthias Mair
2024-04-15 12:33:26 +02:00
parent a3da256724
commit c9b1d44c28
6 changed files with 11 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
import { ActionIcon, Group, Tooltip } from '@mantine/core'; import { ActionIcon, FloatingPosition, Group, Tooltip } from '@mantine/core';
import { FloatingPosition } from '@mantine/core/lib/Floating';
import { ReactNode } from 'react'; import { ReactNode } from 'react';
import { notYetImplemented } from '../../functions/notifications'; import { notYetImplemented } from '../../functions/notifications';

View File

@@ -3,7 +3,7 @@ import {
Divider, Divider,
Drawer, Drawer,
Group, Group,
MantineNumberSize, MantineSize,
Stack, Stack,
Text Text
} from '@mantine/core'; } from '@mantine/core';
@@ -26,7 +26,7 @@ export interface DrawerProps {
position?: 'right' | 'left'; position?: 'right' | 'left';
renderContent: (id?: string) => React.ReactNode; renderContent: (id?: string) => React.ReactNode;
urlPrefix?: string; urlPrefix?: string;
size?: MantineNumberSize; size?: MantineSize | (string & {}) | number;
closeOnEscape?: boolean; closeOnEscape?: boolean;
} }

View File

@@ -1,5 +1,5 @@
import { t } from '@lingui/macro'; import { t } from '@lingui/macro';
import { Alert, Divider, MantineNumberSize, Stack } from '@mantine/core'; import { Alert, Divider, MantineSize, Stack } from '@mantine/core';
import { useId } from '@mantine/hooks'; import { useId } from '@mantine/hooks';
import { useEffect, useMemo, useRef } from 'react'; import { useEffect, useMemo, useRef } from 'react';
@@ -20,7 +20,7 @@ export interface ApiFormModalProps extends ApiFormProps {
onClose?: () => void; onClose?: () => void;
onOpen?: () => void; onOpen?: () => void;
closeOnClickOutside?: boolean; closeOnClickOutside?: boolean;
size?: MantineNumberSize; size?: MantineSize | (string & {}) | number;
} }
/** /**

View File

@@ -1,4 +1,4 @@
import { MantineNumberSize, Modal } from '@mantine/core'; import { MantineSize, Modal } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks'; import { useDisclosure } from '@mantine/hooks';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
@@ -7,7 +7,7 @@ import { StylishText } from '../components/items/StylishText';
export interface UseModalProps { export interface UseModalProps {
title: string; title: string;
children: React.ReactElement; children: React.ReactElement;
size?: MantineNumberSize; size?: MantineSize | (string & {}) | number;
onOpen?: () => void; onOpen?: () => void;
onClose?: () => void; onClose?: () => void;
closeOnClickOutside?: boolean; closeOnClickOutside?: boolean;

View File

@@ -35,7 +35,7 @@ export default function Login() {
const location = useLocation(); const location = useLocation();
// Data manipulation functions // Data manipulation functions
function ChangeHost(newHost: string): void { function ChangeHost(newHost: string | null): void {
setHost(hostList[newHost]?.host, newHost); setHost(hostList[newHost]?.host, newHost);
setApiDefaults(); setApiDefaults();
fetchServerApiState(); fetchServerApiState();

View File

@@ -1,5 +1,4 @@
import { MantineNumberSize } from '@mantine/core'; import { MantineSize } from '@mantine/core';
import { LoaderType } from '@mantine/styles/lib/theme/types/MantineTheme';
import { create } from 'zustand'; import { create } from 'zustand';
import { persist } from 'zustand/middleware'; import { persist } from 'zustand/middleware';
@@ -19,8 +18,8 @@ interface LocalStateProps {
primaryColor: string; primaryColor: string;
whiteColor: string; whiteColor: string;
blackColor: string; blackColor: string;
radius: MantineNumberSize; radius: MantineSize | (string & {}) | number;
loader: LoaderType; loader: string;
lastUsedPanels: Record<string, string>; lastUsedPanels: Record<string, string>;
setLastUsedPanel: (panelKey: string) => (value: string) => void; setLastUsedPanel: (panelKey: string) => (value: string) => void;
tableColumnNames: Record<string, Record<string, string>>; tableColumnNames: Record<string, Record<string, string>>;