react-icons/fa#FaRedo JavaScript Examples

The following examples show how to use react-icons/fa#FaRedo. 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: Toolbar.js    From dm2 with Apache License 2.0 6 votes vote down vote up
LSFOperations = observer(({ history }) => {
  useShortcut("lsf.undo", () => history?.undo(), {}, [history]);
  useShortcut("lsf.redo", () => history?.redo(), {}, [history]);

  return history ? (
    <Button.Group>
      <Button
        icon={<Icon icon={FaUndo} />}
        disabled={!history.canUndo}
        onClick={() => history.undo()}
      />
      <Button
        icon={<Icon icon={FaRedo} />}
        disabled={!history.canRedo}
        onClick={() => history.redo()}
      />
      <Button
        icon={<Icon icon={FaTrashAlt} />}
        disabled={!history.canUndo}
        onClick={() => history.reset()}
      />
    </Button.Group>
  ) : null;
})
Example #2
Source File: TheHeader.js    From core-audit with MIT License 5 votes vote down vote up
TheHeader = () => {
  const dispatch = useDispatch()
  const sidebarShow = useSelector(state => state.PageReducer.sidebarShow)

  const toggleSidebar = () => {
    const val = [true, 'responsive'].includes(sidebarShow) ? false : 'responsive'
    dispatch(setSidebarShow(val))
  }

  const toggleSidebarMobile = () => {
    const val = [false, "responsive"].includes(sidebarShow)
      ? true
      : "responsive";
    dispatch(setSidebarShow(val));
  };

  return (
    <CHeader withSubheader>
      <CToggler
        inHeader
        className="ml-md-3 d-lg-none"
        onClick={toggleSidebarMobile}
      />
      <CToggler
        inHeader
        className="ml-3 d-md-down-none"
        onClick={toggleSidebar}
      />
      <CHeaderBrand className="mx-auto d-lg-none" to="/">
        <CIcon name="logo" height="48" alt="Logo" />
      </CHeaderBrand>

      <CHeaderNav className="d-md-down-none mr-auto">
        <CHeaderNavItem className="px-3">
          <CHeaderNavLink to="/dashboard">Dashboard</CHeaderNavLink>
        </CHeaderNavItem>
        <CHeaderNavItem className="px-3">
          <CHeaderNavLink to="/users">Users</CHeaderNavLink>
        </CHeaderNavItem>
        <CHeaderNavItem className="px-3">
          <CHeaderNavLink>ConfiguraciĆ³n</CHeaderNavLink>
        </CHeaderNavItem>
      </CHeaderNav>

      <CHeaderNav className="px-3"></CHeaderNav>

      <CSubheader className="px-3 justify-content-between">
        <CBreadcrumbRouter
          className="border-0 c-subheader-nav m-0 px-0 px-md-3"
          routes={routes}
        />
        <div className="d-md-down-none mfe-2 c-subheader-nav">
          {/* <CLink className="c-subheader-nav-link" href="#">
            <CIcon name="cil-speech" alt="ConfiguraciĆ³n" />
          </CLink> */}
          <CLink className="c-subheader-nav-link" href="#">
            <FaRedo />
            &nbsp;
          </CLink>
        </div>
      </CSubheader>
    </CHeader>
  );
}