@fortawesome/free-solid-svg-icons#faLaptop JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faLaptop. 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: icons.js    From WirtBot with GNU Affero General Public License v3.0 6 votes vote down vote up
library.add(
  faFileDownload,
  faTrash,
  faBars,
  faCheckSquare,
  faCheck,
  faPlus,
  faCogs,
  faServer,
  faLaptop,
  faMobileAlt
);
Example #2
Source File: CustomIcons.jsx    From gatsby-startbootstrap-agency with MIT License 5 votes vote down vote up
LaptopIcon = makeFAIcon(faLaptop)
Example #3
Source File: uploadimage.js    From ActiveLearningStudio-react-client with GNU Affero General Public License v3.0 4 votes vote down vote up
UploadImage = ({
  className,
  setUploadImageStatus,
  title,
  defuaultImage,
}) => {
  const [modalShow, setModalShow] = useState(false);
  const currikiUtility = classNames("curriki-utility-uploadimage", className);
  const project = useSelector((state) => state.project);
  const openFile = useRef();
  defuaultImage == null ? defuaultImage : DefaultImage;
  return (
    <>
      <PexelsAPI
        show={modalShow}
        onHide={() => {
          setModalShow(false);
          setUploadImageStatus(false);
        }}
        project={project}
        searchName="abstract"
      />
      <div className={currikiUtility}>
        <p>{title}</p>
        <div
          className="uploadimage-box"
          style={{
            backgroundImage: project.thumbUrl
              ? project.thumbUrl.includes("pexels.com")
                ? `url(${project.thumbUrl})`
                : `url(${global.config.resourceUrl}${project.thumbUrl})`
              : `url(${DefaultImage})`,
          }}
        >
          {/* <img src={DefaultImage} alt="" /> */}
        </div>
        {/* <div className="uploadimage-option">
          <FontAwesomeIcon icon={faLaptop} className="upload-option mr-20" />
          <FontAwesomeIcon icon={faLink} className="upload-option mr-20" />
          <FontAwesomeIcon icon={faHdd} className="upload-option mr-20" />
          <FontAwesomeIcon
            icon={faParachuteBox}
            className="upload-option mr-20"
            onClick={() => {
              setModalShow(true);
              setUploadImageStatus(true);
            }}
          />
        </div> */}
        <div className="uploadimage-option">
          <label style={{ display: "none" }}>
            <input
              ref={openFile}
              type="file"
              accept="image/x-png,image/jpeg"
              onChange={(e) => {
                if (e.target.files.length === 0) {
                  return true;
                }
                if (
                  !(
                    e.target.files[0].type.includes("png") ||
                    e.target.files[0].type.includes("jpg") ||
                    e.target.files[0].type.includes("gif") ||
                    e.target.files[0].type.includes("jpeg")
                  )
                ) {
                  Swal.fire({
                    icon: "error",
                    title: "Error",
                    text: "Invalid file selected.",
                  });
                } else if (e.target.files[0].size > 100000000) {
                  Swal.fire({
                    icon: "error",
                    title: "Error",
                    text: "Selected file size should be less then 100MB.",
                  });
                } else {
                  uploadThumb(e);
                }
              }}
            />
            <span>Upload</span>
          </label>
          <button
            type="button"
            onClick={() => {
              openFile.current.click();
            }}
            className="btn-mr-27"
          >
            <FontAwesomeIcon icon={faLaptop} className="mr-20" />
            My device
          </button>
          <button
            type="button"
            onClick={() => {
              setModalShow(true);
              setUploadImageStatus(true);
            }}
          >
            <img src={PixelIcon} className="mr-20" />
            Pexels
          </button>
        </div>
      </div>
    </>
  );
}