@fortawesome/free-solid-svg-icons APIs
- faTimes
- faSearch
- faPlus
- faBars
- faCheck
- faEnvelope
- fas
- faTrash
- faArrowLeft
- faEdit
- faChevronDown
- faCheckCircle
- faHeart
- faExternalLinkAlt
- faHome
- faSpinner
- faArrowRight
- faEye
- faSignOutAlt
- faUsers
- faTrashAlt
- faTimesCircle
- faMapMarkerAlt
- faUser
- faChevronRight
- faAngleRight
- faCopy
- faExclamationTriangle
- faDownload
- faCog
- faAngleDown
- faUpload
- faLink
- faShoppingCart
- faCogs
- faInfoCircle
- faQuestionCircle
- faMoon
- faStar
- faGlobe
- faUserPlus
- faAngleUp
- faArrowDown
- faPhone
- faPlay
- faPencilAlt
- faCode
- faCalendar
- faSyncAlt
- faArrowUp
- faAngleLeft
- faEllipsisV
- faEyeSlash
- faChevronLeft
- faFile
- faChevronUp
- faClock
- faSun
- faCalendarAlt
- faSync
- faPaperPlane
- faQuestion
- faDollarSign
- faSignInAlt
- faList
- faFilter
- faComment
- faLock
- faUserCircle
- faShoppingBag
- faBell
- faFileAlt
- faBullhorn
- faMinus
- faPaperclip
- faCaretDown
- faHandHoldingUsd
- faHandshake
- faThumbsUp
- faChartPie
- faCodeBranch
- faTh
- faFolder
- faLaptop
- faTag
- faBook
- faCircleNotch
- faWrench
- faHistory
- faBan
- faExclamationCircle
- faPen
- faPause
- faMinusCircle
- faAlignLeft
- faAngleDoubleLeft
- faAngleDoubleRight
- faCalendarDay
- faLaptopCode
- faFire
- faPalette
- faMailBulk
- faRedoAlt
- faSave
- faEraser
- faBriefcase
- faFolderOpen
- faCompass
- faLightbulb
- faBox
- faVideo
- faLocationArrow
- faChartBar
- faExchangeAlt
- faTable
- faTachometerAlt
- faImages
- faShare
- faShareAlt
- faPlusSquare
- faShareSquare
- faVolumeMute
- faVolumeUp
- faFolderPlus
- faImage
- faCalculator
- faDatabase
- faRandom
- faMapPin
- faMapMarker
- faTabletAlt
- faUserFriends
- faAward
- faCalendarCheck
- faCoffee
- faGreaterThan
- faArrowCircleRight
- faFlask
- faStarHalfAlt
- faCompressAlt
- faExpandAlt
- faSortUp
- faSortDown
- faEllipsisH
- faMobileAlt
- faCross
- faShoppingBasket
- faCommentDots
- faBuilding
- faSearchDollar
- faMoneyCheck
- faExclamation
- faCloudDownloadAlt
- faChartLine
- faBookmark
- faMap
- faInbox
- faUnlink
- faUndo
- faPlusCircle
- faPlug
- faTools
- faClipboard
- faThLarge
- faComments
- faRedo
- faAddressBook
- faArrowsAlt
- faMicrochip
- faCubes
- faIdBadge
- faChartArea
- faBolt
- faMedal
- faTrophy
- faUserEdit
- faChalkboardTeacher
- faGraduationCap
- faUserGraduate
- faPercent
- faHandPointer
- faUndoAlt
- faFillDrip
- faFileUpload
- faVirus
- faGlobeAmericas
- faCalendarWeek
- faCalendarTimes
- faPhoneAlt
- faFilePdf
- faClipboardList
- faEnvelopeSquare
- faLessThan
- faGripLinesVertical
- faStepBackward
- faStepForward
- faCamera
- faBellSlash
- faArrowCircleDown
- faHeadSideCough
- faIndustry
- faLongArrowAltRight
- faDrawPolygon
- faMicrophone
- faMicrophoneSlash
- faWindowMinimize
- faWindowMaximize
- faCircle
- faVideoSlash
- faFileDownload
- faCheckSquare
- faServer
- faEquals
- faCreditCard
- faCartPlus
- faSearchPlus
- faPlaneDeparture
- faLanguage
- faInfo
- faRss
- faSnowflake
- faFan
- faThumbsDown
- faStop
- faGamepad
- faArrowAltCircleLeft
- faArrowAltCircleRight
- faAtom
- faCaretSquareLeft
- faCaretSquareRight
- faUserSlash
- faMoneyBill
- faCloudMoon
- faCar
- faHandPaper
- faMoneyBillWaveAlt
- faBorderAll
- faHotel
- faHatCowboySide
- faDog
- faCat
- faShip
- faFrog
- faTrain
- faFaucet
- faArrowAltCircleUp
- faStream
- faArrowsAltV
- faExternalLinkSquareAlt
- faLockOpen
- faClipboardCheck
- faFileSignature
- faMagnet
- faPencilRuler
- faRulerCombined
- faMusic
- faCommentAlt
- faFilm
- faCut
- faChevronCircleDown
- faRssSquare
- faTree
- faPrint
- faStamp
- faEllipsis
- faRefresh
- faForward
- faAdjust
- faScroll
- faRobot
- faCaretRight
- faFileImport
- faSatelliteDish
- faSlidersH
- faHourglassHalf
- faAsterisk
- faBlog
- faSignal
- faRoad
- faSuperscript
- faTags
- faFlagUsa
- faGlobeEurope
- faDesktop
- faArrowCircleLeft
- faPoll
- faFileInvoice
- faMagic
- faAt
- faNetworkWired
- faBookReader
- faDonate
- faInfinity
- faUserNinja
OtherRelated APIs
- react#useState
- react#useEffect
- @fortawesome/react-fontawesome#FontAwesomeIcon
- @fortawesome/free-solid-svg-icons#faCompressAlt
- @fortawesome/free-solid-svg-icons#faWindowMinimize
- @fortawesome/free-solid-svg-icons#faWindowMaximize
- react-bootstrap#Row
- @fortawesome/free-brands-svg-icons#faHtml5
- @fortawesome/free-brands-svg-icons#faCss3Alt
- @fortawesome/free-brands-svg-icons#faJs
@fortawesome/free-solid-svg-icons#faExpandAlt JavaScript Examples
The following examples show how to use
@fortawesome/free-solid-svg-icons#faExpandAlt.
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: Editor.js From Codera with MIT License | 5 votes |
function Editor(props) {
const { displayName, language, value, onChange } = props;
let imgName = "";
if (displayName === "HTML") {
imgName = faHtml5;
}
if (displayName === "CSS") {
imgName = faCss3Alt;
}
if (displayName === "JS") {
imgName = faJs;
}
const [open, setOpen] = useState(true);
function handleChange(editor, data, value) {
onChange(value);
}
return (
<div className={`editor-container ${open ? "expand" : "collapsed"}`}>
<div className="editor-title">
<span>
<FontAwesomeIcon icon={imgName} />
</span>
{displayName}
<button
type="button"
className="expand-collapse-btn"
onClick={() => setOpen((prevOpen) => !prevOpen)}
title={open ? "Collapse" : "Expand"}
>
<FontAwesomeIcon icon={open ? faCompressAlt : faExpandAlt} />
</button>
</div>
<ControlledEditor
onBeforeChange={handleChange}
value={value}
className="code-mirror-wrapper"
options={{
lineWrapping: true,
lint: true,
mode: language,
lineNumbers: true,
theme: "material",
}}
/>
</div>
);
}
Example #2
Source File: video-chat.jsx From codeinterview-frontend with Apache License 2.0 | 4 votes |
VideoChat = () => {
const [myPeerId, setMyPeerId] = useState(
window.sync?.peerId || null
);
const [streams, setStreams] = useState(window.sync?.streams || {});
const [localStream, setLocalStream] = useState(null);
const [focusStream, setFocusStream] = useState(null);
const [focusId, setFocusId] = useState(null);
const [uiCompressed, setUiCompressed] = useState(false);
const [uiMinimized, setUiMinimized] = useState(false);
// Media stream helper
const getMediaStream = () => {
window.sync
.getUserMedia()
.then(stream => {
// don't want our audio echo
setLocalStream(new MediaStream(stream.getVideoTracks()));
})
.catch(console.warn);
};
// Sync listeners
const addStream = ({ peerId, stream }) => {
setStreams({
...streams,
[peerId]: stream,
});
};
const updatePeers = () => {
setStreams(window.sync.streams);
};
useEffect(() => {
const { sync } = window;
// sync object event listeners
sync.on('ready', updatePeers);
sync.on('peers', updatePeers);
sync.on('stream', ({ peerId, stream }) => {
addStream({ peerId, stream });
setFocusStream(stream);
setFocusId(peerId);
});
sync.on('peerId', setMyPeerId);
// get user media
getMediaStream();
return () => {
try {
window.sync.releaseUserMedia();
} catch (err) {
console.warn('error while releasing user stream', err);
}
};
}, []);
if (uiMinimized && !uiCompressed) setUiCompressed(true);
if (myPeerId) streams[myPeerId] = localStream;
return (
<div
className={`video-chat-window
${(uiCompressed && 'compressed') || ''}
${(uiMinimized && 'minimized') || ''}`}
>
<div className="title-bar align-right">
<FontAwesomeIcon
icon={uiCompressed ? faExpandAlt : faCompressAlt}
pull="right"
className="mr-1"
onClick={() => {
setUiCompressed(!uiCompressed);
setUiMinimized(false);
}}
/>
<FontAwesomeIcon
icon={uiMinimized ? faWindowMaximize : faWindowMinimize}
pull="right"
size="xs"
onClick={() => {
setUiMinimized(!uiMinimized);
}}
/>
</div>
<div className="video-chat-container">
<OverlayScrollbarsComponent
options={{
autoUpdate: true,
resize: uiCompressed ? 'vertical' : 'both',
scrollbars: { autoHide: 'leave' },
className: 'os-theme-light',
}}
>
<Row className="focus-stream-row d-flex justify-content-center">
<Player
className="focus-stream"
showControls={
focusStream === null
? false
: focusStream !== localStream
}
stream={focusStream || localStream}
name={getName(focusId)}
/>
</Row>
<Row
className="peer-stream-row d-flex justify-content-center"
noGutters
>
{Object.keys(streams).map(id => {
if (
focusStream === streams[id] ||
(!focusStream && streams[id] === localStream)
)
return '';
return (
<Player
key={id}
showControls={streams[id] !== localStream}
width=""
className="peer-stream"
stream={streams[id]}
name={getName(id)}
onClick={() => {
setFocusStream(streams[id]);
setFocusId(id);
}}
/>
);
})}
</Row>
</OverlayScrollbarsComponent>
</div>
</div>
);
}