react-icons/fi APIs
- FiArrowLeft
- FiInfo
- FiLogIn
- FiCheckCircle
- FiUpload
- FiClock
- FiX
- FiPlus
- FiArrowRight
- FiSearch
- FiXCircle
- FiUser
- FiChevronRight
- FiAlertCircle
- FiTrash
- FiSettings
- FiExternalLink
- FiChevronDown
- FiChevronLeft
- FiPower
- FiMenu
- FiGithub
- FiGrid
- FiChevronUp
- FiCheck
- FiCopy
- FiMail
- FiLock
- FiCamera
- FiHome
- FiLogOut
- FiThumbsUp
- FiWifi
- FiArrowUp
- FiDownload
- FiEdit2
- FiMoon
- FiCode
- FiSave
- FiPlusCircle
- FiTrash2
- FiBell
- FiMonitor
- FiMessageCircle
- FiCircle
- FiArrowUpRight
- FiAlertTriangle
- FiBarChart2
- FiThumbsDown
- FiPlayCircle
- FiZap
- FiCheckSquare
- FiEdit3
- FiPlusSquare
- FiPackage
- FiUsers
- FiMinus
- FiEdit
- FiMoreVertical
- FiSun
- FiActivity
- FiLayout
- FiAlignLeft
- FiArrowRightCircle
- FiSliders
- FiHeart
- FiBluetooth
- FiSmartphone
- FiNavigation
- FiHelpCircle
- FiXOctagon
- FiZoomIn
- FiZoomOut
- FiWifiOff
- FiFeather
- FiCalendar
- FiPercent
- FiTriangle
- FiArchive
- FiBookOpen
- FiCrosshair
- FiLifeBuoy
- FiGitMerge
- FiRepeat
- FiServer
- FiStar
- FiUserMinus
- FiHexagon
- FiTwitter
- FiFileText
- FiImage
- FiLoader
- FiBook
- FiDatabase
- FiMinusCircle
- FiRefreshCcw
- FiMaximize2
- FiSquare
- FiFilm
- FiUserCheck
- FiFrown
- FiTool
- FiFolder
- FiTruck
- FiArrowDown
- FiType
- FiVideo
- FiPlay
- FiRadio
- FiVolume2
- FiBox
- FiDollarSign
- FiCreditCard
- FiHardDrive
- FiEye
- FiAperture
- FiTag
- FiFastForward
- FiLayers
- FiMapPin
- FiMessageSquare
- FiRss
- FiTv
- FiCpu
- FiGitBranch
- FiClipboard
- FiFilePlus
- FiFile
- FiRefreshCw
- FiPaperclip
- FiHash
- FiLink2
Other Related APIs
react-icons/fi#FiMaximize2 TypeScript Examples
The following examples show how to use
react-icons/fi#FiMaximize2.
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: index.tsx From rocketredis with MIT License | 5 votes |
Header: React.FC = () => {
const handleCloseWindow = useCallback(() => {
const window = remote.getCurrentWindow()
window.close()
}, [])
const handleMaximize = useCallback(() => {
const window = remote.getCurrentWindow()
const isMacSystem = os.platform() === 'darwin'
if (isMacSystem) {
return window.setFullScreen(!window.isFullScreen())
}
const { width: currentWidth, height: currentHeight } = window.getBounds()
const {
width: maxWidth,
height: maxHeight
} = remote.screen.getPrimaryDisplay().workAreaSize
const isMaximized = currentWidth === maxWidth && currentHeight === maxHeight
if (!isMaximized) {
window.maximize()
} else {
window.unmaximize()
}
}, [])
const handleMinimize = useCallback(() => {
const window = remote.getCurrentWindow()
window.minimize()
}, [])
const useMacOSWindowActionButtons = useConfig('useMacOSWindowActionButtons')
const shouldUseMacOSWindowActions = useMemo(() => {
return useMacOSWindowActionButtons || os.platform() === 'darwin'
}, [useMacOSWindowActionButtons])
return (
<Container>
<strong>Rocket Redis</strong>
{shouldUseMacOSWindowActions ? (
<WindowActions position="left" shouldShowIconsOnHover>
<MacActionButton color="close" onClick={handleCloseWindow}>
<FiX />
</MacActionButton>
<MacActionButton color="minimize" onClick={handleMinimize}>
<FiMinus />
</MacActionButton>
<MacActionButton color="maximize" onClick={handleMaximize}>
<FiMaximize2 />
</MacActionButton>
</WindowActions>
) : (
<WindowActions position="right">
<DefaultActionButton onClick={handleMinimize}>
<FiMinus />
</DefaultActionButton>
<DefaultActionButton onClick={handleMaximize}>
<FiSquare />
</DefaultActionButton>
<DefaultActionButton onClick={handleCloseWindow}>
<FiX />
</DefaultActionButton>
</WindowActions>
)}
</Container>
)
}