@fortawesome/free-solid-svg-icons APIs
- faTimes
- faCheck
- faTrash
- faCog
- faInfoCircle
- faPlus
- faSearch
- faSpinner
- faArrowLeft
- faCopy
- faChevronDown
- faExclamationTriangle
- faUser
- faEdit
- faBars
- faHome
- faCheckCircle
- faExclamationCircle
- faQuestionCircle
- faPlay
- faTrashAlt
- faArrowRight
- faChevronRight
- faChevronUp
- fas
- faEye
- faSignOutAlt
- faLink
- faPen
- faSync
- faEyeSlash
- faStar
- faChevronLeft
- faLock
- faDownload
- faCaretDown
- faClock
- IconDefinition
- faEllipsisV
- faHeart
- faCode
- faAngleDown
- faTimesCircle
- faGlobe
- faFilter
- faSave
- faBell
- faList
- faSortDown
- faSortUp
- faUsers
- faArrowDown
- faArrowUp
- faPause
- faUndo
- faMoon
- faWindowMaximize
- faSyncAlt
- faExternalLinkAlt
- faAngleUp
- faAngleLeft
- faUpload
- faClipboard
- faBook
- faComments
- faSquare
- faCheckDouble
- faPlusCircle
- faComment
- faRandom
- faStop
- faFolderPlus
- faCamera
- faBan
- faEnvelope
- faGavel
- faPalette
- faPlane
- faTasks
- faPencilAlt
- faExchangeAlt
- faMapMarkerAlt
- faAngleRight
- faSun
- faMicrophone
- faMicrophoneSlash
- faVideo
- faVideoSlash
- faFile
- faLanguage
- faCogs
- faUserEdit
- faUserPlus
- faMinus
- faFolderOpen
- faCircleNotch
- faUserAlt
- faCodeBranch
- faCube
- faLaptopCode
- faMap
- faChartArea
- faHistory
- faShare
- faCloudDownloadAlt
- faFileUpload
- faCalendarAlt
- faLightbulb
- faPaperPlane
- faPaintBrush
- faExclamation
- faAnchor
- faBomb
- faMusic
- faCompress
- faExpand
- faRegistered
- faWifi
- faDrawPolygon
- faPhone
- faCommentDots
- faVolumeUp
- faCaretUp
- faBug
- faUserCircle
- faWallet
- faFileContract
- faTag
- faSearchPlus
- faSort
- faKey
- faVolumeMute
- faPowerOff
- faBolt
- faRedoAlt
- faSortAmountDown
- faCloudUploadAlt
- faShapes
- faSortAmountUp
- faTools
- faFileCode
- faRedo
- faAlignLeft
- faUserFriends
- faBookOpen
- faChartBar
- faFileExport
- faFileImport
- faSadCry
- faRocket
- faLinkSlash
- faTh
- faLongArrowAltRight
- faTags
- faDog
- faTv
- faCartPlus
- faMicrochip
- faNetworkWired
- faCommentSlash
- faAddressBook
- faCalendar
- faToggleOff
- faToggleOn
- faUserClock
- faHourglass
- faQuestion
- faStamp
- faAddressCard
- faPoo
- faAppleAlt
- faBible
- faBone
- faCar
- faCat
- faChess
- faSkull
- faFeatherAlt
- faFire
- faWindowMinimize
- faReplyAll
- faSignInAlt
- faBold
- faItalic
- faUnderline
- faHeading
- faQuoteRight
- faListOl
- faListUl
- faLevelDownAlt
- faLevelUpAlt
- faUndoAlt
- faPlug
- faBullhorn
- faPlaneDeparture
- faSimCard
- faBrush
- faAngleDoubleDown
- faCoins
- faCompressArrowsAlt
- faDiceD6
- faNewspaper
- faMinimize
- faUpRightFromSquare
- faCubes
- faRetweet
- faHandPeace
- faSpaceShuttle
- faXmark
- faFileAudio
- faStopwatch
- faDragon
- faSortNumericDown
- faSortNumericDownAlt
- faArrowUpRightFromSquare
- faArrowDown19
- faArrowDown91
- faHashtag
- faRepeat
- faLaptop
- faCloud
- faPiggyBank
- faRunning
- faBiking
- faBicycle
- faShareAlt
- faRuler
- faVial
- faUserTimes
- faUserMinus
- faCalendarDay
- faStepBackward
- faStepForward
- faDotCircle
- faUserLock
- faUserCog
- faTrophy
- faShareSquare
- faHandPointRight
- faChartLine
- faUserShield
- faCheckSquare
- faSortAmountDownAlt
- faIdCard
- faUserSlash
- faCalculator
- faEllipsisH
- faRulerCombined
- faSoap
- faMousePointer
- faHandRock
- faDroplet
- faThumbtack
- faReply
- faLayerGroup
- faMask
- faWindowRestore
- faThLarge
- faDesktop
- faInfo
- faHandsHelping
- faKeyboard
- faChartPie
- faColumns
- faTable
- faTachometerAlt
- faClipboardList
- faHammer
- faLockOpen
- faCity
- faChessRook
- faMountain
- faCampground
- faUniversity
- faCrosshairs
- faWrench
- faArrowCircleLeft
- faIdCardAlt
- faCreditCard
- faDollarSign
- faIdBadge
- faSlidersH
- faEuroSign
- faPoundSign
- faSearchDollar
- faPlayCircle
- faStream
- faFilm
- faSmile
- faPhoneAlt
- faArrowsAltV
- faUserAltSlash
- faLongArrowAltLeft
- faHdd
- faUnlink
- faInbox
- faMagic
- faImage
- faCalendarCheck
- faUserCheck
- faFolder
- faThermometerEmpty
- faCut
- faPaste
- faCircle
- faMobile
- faClipboardCheck
- faSortAlphaUp
- faSortAlphaDown
- faRss
- faPaw
Other Related APIs
@fortawesome/free-solid-svg-icons#faCommentSlash TypeScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faCommentSlash.
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: IconSettingsCategory.tsx From NewWorldMinimap with MIT License | 4 votes |
export default function IconSettingsCategory(props: IProps) {
const {
category,
categoryKey,
updateIconCategorySettings,
updateIconSettings,
updateIconsInCategory,
updateSettings,
} = props;
const { classes } = useStyles();
const { classes: sharedClasses } = useSharedSettingsStyles();
const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);
if (!category) { return null; }
function toggleOpen(e: React.MouseEvent<HTMLElement>) {
// Do not toggle if a label was clicked.
if (!containedByInclusive(e.target as HTMLElement, el => el instanceof HTMLLabelElement)) {
e.preventDefault();
setExpanded(!expanded);
}
}
const renderTypes = () => Object.entries(category.types).sort(compareNames).map(([typeKey, type]) => {
if (!type) { return null; }
return <div key={typeKey}>
<label className={classes.checkboxIcon} title={t('settings.icon.toggleVisible')}>
<input
type='checkbox'
checked={type.visible}
onChange={e => updateSettings({ iconSettings: updateIconSettings(categoryKey, typeKey, 'visible', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={type.visible ? faEye : faEyeSlash}
opacity={type.visible ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<label className={clsx(classes.checkboxIcon, !type.visible && classes.invisible)} title={t('settings.icon.toggleShowLabel')}>
<input
type='checkbox'
checked={type.showLabel}
onChange={e => updateSettings({ iconSettings: updateIconSettings(categoryKey, typeKey, 'showLabel', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={type.showLabel ? faComment : faCommentSlash}
opacity={type.showLabel ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<span className={classes.categoryTypeName}>{getIconName(type.category, type.type)}</span>
</div>;
});
const hasAnyVisible = Object.values(category.types).some(t => t?.visible ?? false);
const hasAnyShowLabel = Object.values(category.types).some(t => t?.showLabel ?? false);
return <details key={categoryKey} open={expanded}>
<summary className={sharedClasses.summary} onClick={toggleOpen}>
<label className={classes.checkboxIcon} title={t('settings.icon.toggleVisible')}>
<input
type='checkbox'
checked={category.visible}
onChange={e => updateSettings({ iconSettings: updateIconCategorySettings(categoryKey, 'visible', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={category.visible ? faEye : faEyeSlash}
opacity={category.visible ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<label className={clsx(classes.checkboxIcon, !category.visible && classes.invisible)} title={t('settings.icon.toggleShowLabel')}>
<input
type='checkbox'
checked={category.showLabel}
onChange={e => updateSettings({ iconSettings: updateIconCategorySettings(categoryKey, 'showLabel', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={category.showLabel ? faComment : faCommentSlash}
opacity={category.showLabel ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<span>{getIconName(category.category)}</span>
</summary>
{expanded &&
<div className={classes.toggleAllEntry}>
<label className={classes.checkboxIcon} title={t('settings.icon.toggleVisible')}>
<input
type='checkbox'
checked={hasAnyVisible}
onChange={e => updateSettings({ iconSettings: updateIconsInCategory(categoryKey, 'visible', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={hasAnyVisible ? faEye : faEyeSlash}
opacity={hasAnyVisible ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<label className={classes.checkboxIcon} title={t('settings.icon.toggleShowLabel')}>
<input
type='checkbox'
checked={hasAnyShowLabel}
onChange={e => updateSettings({ iconSettings: updateIconsInCategory(categoryKey, 'showLabel', e.currentTarget.checked) })}
/>
<FontAwesomeIcon
icon={hasAnyShowLabel ? faComment : faCommentSlash}
opacity={hasAnyShowLabel ? 1 : 0.5}
fixedWidth={true}
/>
</label>
<span className={classes.categoryTypeName}>{t('settings.icon.toggleAll')}</span>
</div>
}
{expanded &&
<div className={classes.iconTypeContainer}>
{renderTypes()}
</div>
}
</details>;
}