#
whycq
2025-03-03 8473d57f551e88176e1a7b9e8ea50648ce918f17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { ListItem, ListItemIcon, ListItemText, ListItemButton, Box, ListItemSecondaryAction } from "@mui/material";
import React, { useState, useRef, useEffect, useMemo } from "react";
import * as Icons from '@mui/icons-material';
 
const Warehouse = (props) => {
    const { record } = props;
    const IconComponent = Icons[record.icon];
    return (
        <Box sx={{padding: '5px'}}>
            <ListItem disablePadding>
                <ListItemButton >
                    <ListItemIcon sx={{ minWidth: '30px' }}>
                        <IconComponent />
                    </ListItemIcon>
                    <ListItemText primary={record.name} />
                    <ListItemSecondaryAction>
                        <Box
                            component="span"
                            sx={{
                                marginRight: '1em',
                                color: 'text.primary',
                            }}
                        >
                            {record.locCount}
                        </Box>
                    </ListItemSecondaryAction>
                </ListItemButton>
            </ListItem>
        </Box>
    )
}
 
 
export default Warehouse;