@@ -38,63 +38,63 @@ class CardEntryProps {
3838 }
3939}
4040
41+ const NewFileModal = ( {
42+ onSubmit,
43+ isOpen,
44+ onClose,
45+ fileList,
46+ location,
47+ } : {
48+ onSubmit : Function ;
49+ isOpen : boolean ;
50+ onClose : Function ;
51+ fileList : Entry [ ] ;
52+ location : string ;
53+ } ) => {
54+ const theme = useTheme ( ) ;
55+ const focusInputRef = useRef < HTMLInputElement > ( null ) ;
56+ const [ formState , setFormState ] = useState ( initialNewFileModalData ) ;
57+ const [ template , setTemplate ] = useState < string > ( "empty" ) ;
58+ const [ creationType , setCreationType ] = useState < string > ( "plain" ) ;
59+ const [ isCreationAllowed , allowCreation ] = useState < boolean > ( false ) ;
60+ // Search lists for valid names
61+ const [ searchActionsList , setSearchActionsList ] = useState < Entry [ ] > ( [ ] ) ;
62+ const [ searchPlainList , setSearchPlainList ] = useState < Entry [ ] > ( [ ] ) ;
63+
4164///////////////////////// TYPES ////////////////////////////////////////////////
4265const plain = new CardEntryProps (
4366 "plain" ,
4467 "plainType" ,
45- < ActionTeplateIcon className = "bt-icon" fill = { "var(--icon)" } /> ,
68+ < ActionTeplateIcon fill = { theme . palette . text } /> ,
4669 "Plain File"
4770) ;
4871const actions = new CardEntryProps (
4972 "actions" ,
5073 "actionsType" ,
51- < IOTeplateIcon className = "bt-icon" fill = { "var(--icon)" } /> ,
74+ < IOTeplateIcon fill = { theme . palette . text } /> ,
5275 "Action"
5376) ;
5477
5578///////////////////////// ACTIONS //////////////////////////////////////////////
5679const empty = new CardEntryProps (
5780 "empty" ,
5881 "emptyTemplate" ,
59- < EmptyTeplateIcon className = "bt-icon" stroke = { "var(--icon)" } /> ,
82+ < EmptyTeplateIcon stroke = { theme . palette . text } /> ,
6083 "Empty"
6184) ;
6285const action = new CardEntryProps (
6386 "action" ,
6487 "actionTemplate" ,
65- < ActionTeplateIcon className = "bt-icon" fill = { "var(--icon)" } /> ,
88+ < ActionTeplateIcon fill = { theme . palette . text } /> ,
6689 "Action"
6790) ;
6891const io = new CardEntryProps (
6992 "io" ,
7093 "ioTemplate" ,
71- < IOTeplateIcon className = "bt-icon" fill = { "var(--icon)" } /> ,
94+ < IOTeplateIcon fill = { theme . palette . text } /> ,
7295 "I/O"
7396) ;
7497
75- const NewFileModal = ( {
76- onSubmit,
77- isOpen,
78- onClose,
79- fileList,
80- location,
81- } : {
82- onSubmit : Function ;
83- isOpen : boolean ;
84- onClose : Function ;
85- fileList : Entry [ ] ;
86- location : string ;
87- } ) => {
88- const theme = useTheme ( ) ;
89- const focusInputRef = useRef < HTMLInputElement > ( null ) ;
90- const [ formState , setFormState ] = useState ( initialNewFileModalData ) ;
91- const [ template , setTemplate ] = useState < string > ( "empty" ) ;
92- const [ creationType , setCreationType ] = useState < string > ( "plain" ) ;
93- const [ isCreationAllowed , allowCreation ] = useState < boolean > ( false ) ;
94- // Search lists for valid names
95- const [ searchActionsList , setSearchActionsList ] = useState < Entry [ ] > ( [ ] ) ;
96- const [ searchPlainList , setSearchPlainList ] = useState < Entry [ ] > ( [ ] ) ;
97-
9898 const typesCardEntryProps = [ plain , actions ] ;
9999 const actionsCardEntryProps = [ empty , action , io ] ;
100100
0 commit comments