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

The following examples show how to use @fortawesome/free-solid-svg-icons#faCaretRight. 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: RequestInput.js    From Postman-Clone with MIT License 5 votes vote down vote up
RequestInput = (props) => {
  const { tab, handleChange, handleSubmit } = props;
  if (tab !== undefined) {
    return (
      <div className="content__requestInputWrapper">
        <div className="content__requestDetailsRow">
          <div className="content__requestDetailsColumn">
            <FontAwesomeIcon icon={faCaretRight} />
            <span className="content__requestDetailsName">{tab.name}</span>
          </div>
          <div className="content__requestDetailsColumn">
            <FontAwesomeIcon icon={faComment} />
            <span className="content__requestDetailsName">
              Comments
              <span className="content__requestBadge">0</span>
            </span>
            <span className="content__requestDetailsName">
              Examples
              <span className="content__requestBadge">0</span>
            </span>
            <FontAwesomeIcon icon={faCaretDown} />
          </div>
        </div>
        {/* Input */}

        <div className="content__requestInputRow">
          <div className="content__requestInputColumn">
            <select>
              <option>GET</option>
              <option>POST</option>
            </select>
            <input type="text" placeholder="" onChange={handleChange} />
            <button
              className="content__requestSendButton"
              onClick={handleSubmit}
            >
              Send
              <FontAwesomeIcon
                icon={faCaretDown}
                className="content__requestSendButtonIcon"
              />
            </button>
            <button className="content__requestSaveButton ">
              Save
              <FontAwesomeIcon
                icon={faCaretDown}
                className="content__requestSendButtonIcon"
              />
            </button>
          </div>
        </div>
      </div>
    );
  } else {
    return null;
  }
}
Example #2
Source File: Sidebar.js    From Postman-Clone with MIT License 5 votes vote down vote up
Sidebar = () => {
  const [tabs] = useState(["History", "Collections", "APIs"]);
  const [tabIndex, setTabIndex] = useState(1);

  const handleTabChange = (index) => {
    setTabIndex(index);
  };

  return (
    <div className="sidebar">
      <div className="sidebar__searchBarWrapper">
        <input
          type="text"
          placeholder="Filter"
          className="sidebar__searchBar"
        />
        <div className="sidebar__menu">
          {tabs.map((tab, index) => {
            return (
              <span
                onClick={() => handleTabChange(index)}
                className={
                  index === tabIndex
                    ? "sidebar__menuOptions active"
                    : "sidebar__menuOptions"
                }
              >
                {tab}
              </span>
            );
          })}
        </div>
        <div className="sidebar__row">
          <div className="sidebar__column">
            <span className="sidebar__newCollectionLink">
              <FontAwesomeIcon icon={faPlus} /> New Collection
            </span>
            <span className="sidebar__trashLink">Trash</span>
          </div>
        </div>
        {/* Collections List */}
        <div className="sidebar__collectionList">
          {collections.map((collection, index) => {
            return (
              <div className="sidebar__collection">
                <div className="sidebar__collectionRow">
                  <div className="sidebar__collectionColumn">
                    <FontAwesomeIcon
                      icon={faCaretRight}
                      className="sidebar__icons"
                    />
                    <FontAwesomeIcon
                      icon={faFolder}
                      className="sidebar__icons"
                    />
                  </div>
                  <div className="sidebar__collectionColumn">
                    <span>{collection.name}</span>
                    <p className="sidebar__collectionRequests">
                      {collection.requestsCount} Requests
                    </p>
                  </div>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </div>
  );
}