-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from TurtIeSocks/import-wizard
Import wizard
- Loading branch information
Showing
70 changed files
with
3,994 additions
and
897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react' | ||
import { FixedSizeList, type ListChildComponentProps } from 'react-window' | ||
|
||
export default function ReactWindow<T, U>({ | ||
children, | ||
rows, | ||
data, | ||
itemSize, | ||
height = 500, | ||
width = '100%', | ||
}: { | ||
children: React.FC<ListChildComponentProps<U & { rows: T[] }>> | ||
rows: T[] | ||
data: U | ||
itemSize?: number | ||
height?: number | ||
width?: number | string | ||
}) { | ||
return ( | ||
<FixedSizeList | ||
height={height} | ||
width={width} | ||
itemCount={rows.length} | ||
itemSize={itemSize || 40} | ||
itemData={{ rows, ...data }} | ||
> | ||
{children} | ||
</FixedSizeList> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import * as React from 'react' | ||
import { | ||
Button, | ||
Dialog, | ||
DialogActions, | ||
DialogContent, | ||
DialogTitleProps, | ||
type DialogProps, | ||
DialogContentProps, | ||
DialogActionsProps, | ||
} from '@mui/material' | ||
import DialogHeader from './Header' | ||
|
||
interface Props { | ||
open: boolean | ||
onClose: () => void | ||
title: string | ||
children: React.ReactNode | ||
Components?: { | ||
Dialog?: Partial<DialogProps> | ||
DialogTitle?: Partial<DialogTitleProps> | ||
DialogContent?: Partial<DialogContentProps> | ||
DialogActions?: Partial<DialogActionsProps> | ||
} | ||
} | ||
export default function BaseDialog({ | ||
open, | ||
onClose, | ||
title, | ||
children, | ||
Components, | ||
}: Props) { | ||
const { children: actions, ...actionProps } = Components?.DialogActions || {} | ||
|
||
return ( | ||
<Dialog open={open} onClose={onClose} {...Components?.Dialog}> | ||
<DialogHeader action={onClose} {...Components?.DialogTitle}> | ||
{title} | ||
</DialogHeader> | ||
<DialogContent {...Components?.DialogContent}>{children}</DialogContent> | ||
<DialogActions | ||
sx={(theme) => ({ | ||
mt: 3, | ||
bgcolor: | ||
theme.palette.mode === 'dark' | ||
? theme.palette.grey[700] | ||
: theme.palette.grey[200], | ||
})} | ||
{...actionProps} | ||
> | ||
{actions} | ||
<Button onClick={onClose} color="error"> | ||
Close | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.