File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed
Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change 11import { useState } from 'react' ;
22import { useEnsureListPath } from '../hooks/useEnsureListPath' ;
3- import { List as UnorderedList } from '@mui/material' ;
3+ import { List as UnorderedList , Box , Grid } from '@mui/material' ;
44import { TextInputElement , AddItems , ListItem } from '../components' ;
55
66export function List ( { data, listPath } ) {
@@ -31,17 +31,31 @@ export function List({ data, listPath }) {
3131 ) : (
3232 < >
3333 < p > { listName } </ p >
34+ < Box sx = { { flexGrow : 1 } } >
35+ < Grid
36+ container
37+ spacing = { 8 }
38+ columns = { 16 }
39+ justifyContent = "space-between"
40+ >
41+ < Grid item size = { { xs : 2 , sm : 4 , md : 4 } } >
42+ < AddItems items = { data } />
43+ </ Grid >
44+ < Grid item size = { { xs : 2 , sm : 4 , md : 4 } } >
45+ < form onSubmit = { ( event ) => event . preventDefault ( ) } >
46+ < TextInputElement
47+ id = "search-item"
48+ type = "search"
49+ placeholder = "Search Item..."
50+ required = { true }
51+ onChange = { handleTextChange }
52+ label = "Search Item:"
53+ />
54+ </ form >
55+ </ Grid >
56+ </ Grid >
57+ </ Box >
3458
35- < form onSubmit = { ( event ) => event . preventDefault ( ) } >
36- < TextInputElement
37- id = "search-item"
38- type = "search"
39- placeholder = "Search Item..."
40- required = { true }
41- onChange = { handleTextChange }
42- label = "Search Item:"
43- />
44- </ form >
4559 < UnorderedList >
4660 { filteredItems . map ( ( item ) => {
4761 return < ListItem key = { item . id } item = { item } listPath = { listPath } /> ;
You can’t perform that action at this time.
0 commit comments