-
Notifications
You must be signed in to change notification settings - Fork 9
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 #26 from neo4j-labs/feature/connectionModalAuraParser
Support for dropping env files + parsing from copy/paste URIs
- Loading branch information
Showing
6 changed files
with
126 additions
and
28 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 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,5 @@ | ||
.ndl-dropzone-header{ | ||
display: flex!important; | ||
flex-direction: row!important; | ||
gap: 30px!important; | ||
} |
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,26 @@ | ||
import React, { createContext, useContext, useState, ReactNode, Dispatch, SetStateAction } from 'react'; | ||
|
||
interface FileContextType { | ||
file: File[] | []; | ||
setFile: Dispatch<SetStateAction<File[]>>; | ||
} | ||
const FileContext = createContext<FileContextType | undefined>(undefined); | ||
interface FileContextProviderProps { | ||
children: ReactNode; | ||
} | ||
const FileContextProvider: React.FC<FileContextProviderProps> = ({ children }) => { | ||
const [file, setFile] = useState<File[] | []>([]); | ||
const value: FileContextType = { | ||
file, | ||
setFile, | ||
}; | ||
return <FileContext.Provider value={value}>{children}</FileContext.Provider>; | ||
}; | ||
const useFileContext = () => { | ||
const context = useContext(FileContext); | ||
if (!context) { | ||
throw new Error('useFileContext must be used within a FileContextProvider'); | ||
} | ||
return context; | ||
}; | ||
export { FileContextProvider, useFileContext }; |
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