@mui/icons-material APIs
- Close
- Add
- Delete
- ExpandMore
- Settings
- Check
- Update
- GitHub
- MoreVert
- HelpOutline
- ChevronRight
- ExpandLess
- Menu
- FileCopy
- CheckBox
- CheckBoxOutlineBlank
- ArrowBack
- DeleteForever
- Visibility
- VisibilityOff
- Save
- Person
- Edit
- People
- ChevronLeft
- PlayArrow
- Home
- ExitToApp
- MoreHoriz
- WbSunny
- Download
- Upload
- Search
- HighlightOffOutlined
- ContentCopy
- Calculate
- ShoppingCart
- AccountBalance
- BarChart
- Paid
- Clear
- Cancel
- ArrowDownward
- ArrowUpward
- PhotoCamera
- Folder
- InfoOutlined
- Code
- KeyboardArrowDown
- Lock
- LockOpen
- Replay
- Favorite
- Build
- Refresh
- AssignmentInd
- Pets
- Public
- Group
- Brush
- KeyboardTab
- Phone
- HelpOutlineOutlined
- NetworkWifi
- CompareArrows
- AdminPanelSettings
- BugReport
- Logout
- Message
- AddCircle
- LockOutlined
- HomeOutlined
- BarChartOutlined
- MusicNote
- MusicNoteOutlined
- Album
- AlbumOutlined
- PersonOutlined
- SettingsOutlined
- Share
- ShareOutlined
- FastRewind
- Help
- Loop
- VolumeDown
- VolumeUp
- PauseCircle
- PlayCircle
- VolumeOff
- ChatBubbleOutline
- LockRounded
- WifiOffRounded
- VideocamOutlined
- AddRounded
- MoreVertRounded
- SyncProblem
- VideoCallOutlined
- GetAppRounded
- SaveAlt
- ErrorRounded
- InsertDriveFileRounded
- CheckCircleOutline
- CloudOff
- ClearAll
- CloseOutlined
- Link
- AttachmentOutlined
- CodeOutlined
- MailOutlineRounded
- Brightness7Rounded
- MenuRounded
- NightsStayRounded
- ArrowForward
- BrushRounded
- VisibilityRounded
- FileCopyRounded
- FavoriteRounded
- DesktopMacRounded
- PhoneAndroidRounded
- TabletMac
- ThumbUpOutlined
- ThumbDownOutlined
- AssistantPhotoOutlined
- Publish
- Create
- WbCloudy
- Computer
- KeyboardArrowUp
- BusinessCenter
- FavoriteBorder
- Groups
- Shuffle
- Difference
- SwapHoriz
- Info
- KeyboardDoubleArrowDown
- KeyboardDoubleArrowUp
- PersonAdd
- Checkroom
- FactCheck
- ArrowRightAlt
- Scanner
- Brightness4
- Brightness7
- Translate
- Backpack
- SettingsBrightness
- Equalizer
- Handyman
- SentimentVerySatisfied
- SentimentDissatisfied
- SentimentSatisfied
- AccessTime
- Remove
- ArrowDropDown
- ArrowRight
- Undo
- Redo
- CreateNewFolder
- Description
- Outbox
- Inbox
- DriveFileRenameOutline
- ContentPaste
- Block
- Star
- StarBorder
- Security
- Today
- Event
- Login
- Sick
- FaceRetouchingOff
- Fireplace
- ErrorOutline
- Stop
- ViewList
- Send
- PlayCircleFilledWhite
- PlaylistAddCheck
- Telegram
- VerifiedUser
- Notifications
- MenuOpen
- GppGood
- ContactPhone
- Payment
- FolderShared
- Class
- Shield
- MoveUp
- VolunteerActivism
- DisplaySettings
- Apartment
- BusAlert
- Category
- FilterNone
- Forest
- MedicalServices
- School
- SportsTennis
- TheaterComedy
- ReportGmailerrorred
- ArrowCircleUp
- UploadFile
- YouTube
- Web
- AccountCircle
- AccessibilityNew
- Chat
- FolderOpen
- FileCopyOutlined
- KeyboardBackspace
- CheckCircleOutlined
- ReportProblemOutlined
- ManageAccounts
- PhotoLibrary
- SettingsBackupRestore
- SupervisorAccount
- Api
- FeaturedPlayList
- BugReportOutlined
- NewReleases
- ColorLens
- FolderOutlined
- Apps
- SpeakerNotes
- LocalCafe
- BurstModeSharp
- DevicesOther
- VideoLibrary
- AddOutlined
- DeleteOutlineOutlined
- EditOutlined
- MoreHorizOutlined
- Bookmarks
- CopyAll
- InsertComment
- KeyboardArrowRight
- FileDownload
- Done
- PendingOutlined
- HelpOutlineRounded
- ReportProblem
- HelpOutlined
Other Related APIs
- react#useState
- react#useEffect
- react#useMemo
- @mui/icons-material#Check
- @mui/icons-material#People
- @mui/icons-material#ArrowDownward
- @mui/icons-material#ArrowUpward
- @mui/icons-material#ExpandMore
- @mui/icons-material#MoreHoriz
- @mui/icons-material#Refresh
- @mui/icons-material#Handyman
- @mui/icons-material#SentimentVerySatisfied
- @mui/icons-material#SentimentDissatisfied
- @mui/icons-material#SentimentSatisfied
- @mui/icons-material#AccessTime
- @mui/material/colors#red
- @mui/material/colors#blue
- @mui/material/colors#green
- @mui/material/colors#orange
- @mui/material/colors#deepPurple
- @mui/material/colors#yellow
@mui/icons-material#Remove TypeScript Examples
The following examples show how to use
@mui/icons-material#Remove.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Dashboard.tsx From NekoMaid with MIT License | 4 votes |
Dashboard: React.FC = () => {
const plugin = usePlugin()
const { version, hasGeoIP } = useGlobalData()
const [status, setStatus] = useState<Status[]>([])
const [current, setCurrent] = useState<CurrentStatus | undefined>()
useEffect(() => {
const offSetStatus = plugin.once('dashboard:info', setStatus)
const offCurrent = plugin.on('dashboard:current', (data: CurrentStatus) => setCurrent(old => {
if (old && isEqual(old.players, data.players)) data.players = old.players
return data
}))
plugin.switchPage('dashboard')
return () => {
offSetStatus()
offCurrent()
}
}, [])
const playerCount = current?.players?.length || 0
const prev = status[status.length - 1]?.players || 0
const percent = (prev ? playerCount / prev - 1 : playerCount) * 100
const tpsColor = !current || current.tps >= 18 ? green : current.tps >= 15 ? yellow : red
return <Box sx={{ minHeight: '100%', py: 3 }}>
<Toolbar />
<Container maxWidth={false}>
<Grid container spacing={3}>
<Grid item lg={3} sm={6} xl={3} xs={12}>
<TopCard
title={lang.dashboard.version}
content={current ? version : <Skeleton animation='wave' width={150} />}
icon={<Handyman />}
color={orange[600]}
>
<Box sx={{ pt: 2, display: 'flex', alignItems: 'flex-end' }}>
{!current || current.behinds < 0
? <Refresh htmlColor={blue[900]} />
: current?.behinds === 0
? <Check htmlColor={green[900]} />
: <Update htmlColor={yellow[900]} />}
<Typography color='textSecondary' variant='caption'> {!current || current.behinds === -3
? lang.dashboard.updateChecking
: current.behinds < 0
? <Link underline='hover' color='inherit' sx={{ cursor: 'pointer' }} onClick={() => {
toast(lang.dashboard.updateChecking)
plugin.emit('dashboard:checkUpdate')
}}>{lang.dashboard.updateFailed}</Link>
: current.behinds === 0 ? lang.dashboard.updated : lang.dashboard.behinds(current.behinds)}</Typography>
</Box>
</TopCard>
</Grid>
<Grid item lg={3} sm={6} xl={3} xs={12}>
<TopCard
title={lang.dashboard.onlinePlayers}
content={current ? playerCount : <Skeleton animation='wave' width={150} />}
icon={<People />}
color={deepPurple[600]}
>
<Box sx={{ pt: 2, display: 'flex', alignItems: 'flex-end' }}>
{percent === 0 ? <Remove color='primary' /> : percent < 0 ? <ArrowDownward color='error' /> : <ArrowUpward color='success' />}
<Typography
sx={{ color: (percent === 0 ? blue : percent < 0 ? red : green)[900], mr: 1 }}
variant='body2'
>{Math.abs(percent).toFixed(0)}%</Typography>
<Typography color='textSecondary' variant='caption'>{lang.dashboard.lastHour}</Typography>
</Box>
</TopCard>
</Grid>
<Grid item lg={3} sm={6} xl={3} xs={12}>
<TopCard
title='TPS'
content={current ? (current.tps === -1 ? '?' : current.tps.toFixed(2)) : <Skeleton animation='wave' width={150} />}
icon={!current || current.tps >= 18 || current.tps === -1
? <SentimentVerySatisfied />
: current.tps >= 15 ? <SentimentSatisfied /> : <SentimentDissatisfied />}
color={tpsColor[600]}
>
<Box sx={{ pt: 2.1, display: 'flex', alignItems: 'flex-end' }}>
<Typography
sx={{ color: tpsColor[900], mr: 1 }}
variant='body2'
>{!current || current.mspt === -1 ? '?' : current.mspt.toFixed(2) + 'ms'}</Typography>
<Typography color='textSecondary' variant='caption'>{lang.dashboard.mspt}</Typography>
</Box>
</TopCard>
</Grid>
<Grid item lg={3} sm={6} xl={3} xs={12}>
<TopCard
title={lang.dashboard.uptime}
content={current ? <Uptime time={current.time} /> : <Skeleton animation='wave' width={150} />}
icon={<AccessTime />}
color={blue[600]}
>
<Box sx={{ pt: 2.7, display: 'flex', alignItems: 'center' }}>
<Typography color='textSecondary' variant='caption' sx={{ marginRight: 1 }}>{lang.dashboard.memory}</Typography>
<Tooltip title={current?.totalMemory ? prettyBytes(current.memory) + ' / ' + prettyBytes(current.totalMemory) : ''}>
<LinearProgress
variant='determinate'
value={current?.totalMemory ? current.memory / current.totalMemory * 100 : 0}
sx={{ flex: '1' }}
/>
</Tooltip>
</Box>
</TopCard>
</Grid>
<Grid item lg={8} md={12} xl={9} xs={12}>{useMemo(() => <Charts data={status} />, [status])}</Grid>
<Grid item lg={4} md={12} xl={3} xs={12}><Players players={current?.players} /></Grid>
{hasGeoIP && current?.players && typeof current.players[0] !== 'string' && <Grid item xs={12}>
<Accordion TransitionProps={{ unmountOnExit: true }} disableGutters>
<AccordionSummary expandIcon={<ExpandMore />}>
<Typography>{lang.dashboard.playersDistribution}</Typography>
</AccordionSummary>
<Divider />
<WorldMap players={current.players as Player[]} />
</Accordion>
</Grid>}
</Grid>
</Container>
</Box>
}