@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#useCallback
- react#MouseEvent
- @mui/material#IconButton
- @mui/material#Tooltip
- @mui/material#Theme
- @mui/material#Typography
- @mui/material#alpha
- @mui/material#Checkbox
- @mui/material#ListItemIcon
- @mui/material#ListItemText
- @mui/material#Menu
- @mui/material#MenuItem
- @mui/material#Skeleton
- @mui/icons-material#Delete
- @mui/icons-material#FileCopy
- @mui/icons-material#MoreVert
@mui/icons-material#KeyboardTab TypeScript Examples
The following examples show how to use
@mui/icons-material#KeyboardTab.
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: CollectionRowActions.tsx From firecms with MIT License | 4 votes |
/**
*
* @param entity
* @param isSelected
* @param selectionEnabled
* @param size
* @param toggleEntitySelection
* @param onCopyClicked
* @param onEditClicked
* @param onDeleteClicked
* @constructor
*
* @category Collection components
*/
export function CollectionRowActions<M extends { [Key: string]: any }>({
entity,
isSelected,
selectionEnabled,
size,
toggleEntitySelection,
onCopyClicked,
onEditClicked,
onDeleteClicked
}:
{
entity: Entity<M>,
size: CollectionSize,
isSelected?: boolean,
selectionEnabled?: boolean,
toggleEntitySelection?: (selectedEntity: Entity<M>) => void
onEditClicked?: (selectedEntity: Entity<M>) => void,
onCopyClicked?: (selectedEntity: Entity<M>) => void,
onDeleteClicked?: (selectedEntity: Entity<M>) => void,
}) {
const editEnabled = Boolean(onEditClicked);
const copyEnabled = Boolean(onCopyClicked);
const deleteEnabled = Boolean(onDeleteClicked);
const classes = useTableStyles();
const [anchorEl, setAnchorEl] = React.useState<any | null>(null);
const openMenu = useCallback((event: React.MouseEvent) => {
setAnchorEl(event.currentTarget);
event.stopPropagation();
}, [setAnchorEl]);
const closeMenu = useCallback(() => {
setAnchorEl(null);
}, [setAnchorEl]);
const onCheckboxChange = (event: React.ChangeEvent) => {
if (toggleEntitySelection)
toggleEntitySelection(entity);
event.stopPropagation();
};
const onDeleteClick = useCallback((event: MouseEvent) => {
event.stopPropagation();
if (onDeleteClicked)
onDeleteClicked(entity);
setAnchorEl(null);
}, [entity, onDeleteClicked, setAnchorEl]);
const onCopyClick = useCallback((event: MouseEvent) => {
event.stopPropagation();
if (onCopyClicked)
onCopyClicked(entity);
setAnchorEl(null);
}, [entity, onCopyClicked, setAnchorEl]);
return (
<div className={classes.cellButtonsWrap}>
{(editEnabled || deleteEnabled || selectionEnabled) &&
<div className={classes.cellButtons}
>
{editEnabled &&
<Tooltip title={`Edit ${entity.id}`}>
<IconButton
onClick={(event: MouseEvent) => {
event.stopPropagation();
if (onEditClicked)
onEditClicked(entity);
}}
size="large">
<KeyboardTab/>
</IconButton>
</Tooltip>
}
{selectionEnabled &&
<Tooltip title={`Select ${entity.id}`}>
<Checkbox
checked={isSelected}
onChange={onCheckboxChange}
/>
</Tooltip>}
{(copyEnabled || deleteEnabled) &&
<IconButton onClick={openMenu} size="large">
<MoreVert/>
</IconButton>
}
{(copyEnabled || deleteEnabled) && <Menu
anchorEl={anchorEl}
open={Boolean(anchorEl)}
onClose={closeMenu}
elevation={2}
>
{deleteEnabled && <MenuItem onClick={onDeleteClick}>
<ListItemIcon>
<Delete/>
</ListItemIcon>
<ListItemText primary={"Delete"}/>
</MenuItem>}
{copyEnabled && <MenuItem onClick={onCopyClick}>
<ListItemIcon>
<FileCopy/>
</ListItemIcon>
<ListItemText primary="Copy"/>
</MenuItem>}
</Menu>}
</div>}
{size !== "xs" && (
<div className={classes.cellButtonsId}>
{entity
? <Typography
className={"mono"}
variant={"caption"}
color={"textSecondary"}> {entity.id} </Typography>
: <Skeleton variant="text"/>
}
</div>
)}
</div>
);
}