react-icons/fa#FaBan JavaScript Examples

The following examples show how to use react-icons/fa#FaBan. 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 5 votes vote down vote up
SubmissionButtons = observer(
  ({ lsf, annotation, isLabelStream, disabled }) => {
    const { userGenerate, sentUserGenerate } = annotation;
    const isNewTask = userGenerate && !sentUserGenerate;

    const saveAnnotation = React.useCallback(() => {
      if (!disabled) {
        isNewTask ? lsf.submitAnnotation() : lsf.updateAnnotation();
      }
    }, [disabled, isNewTask, lsf]);

    const skipTask = React.useCallback(() => {
      if (!disabled) {
        lsf.skipTask();
      }
    }, [disabled, lsf]);

    const buttons = [];

    const submitShortcut = useShortcut('lsf.save-annotation', saveAnnotation, { showShortcut: true }, [disabled]);
    const rejectShortcut = useShortcut('lsf.reject-task', skipTask, { showShortcut: true }, [disabled]);

    buttons.push(
      <Tooltip
        key="skip"
        title={rejectShortcut}
        mouseEnterDelay={TOOLTIP_DELAY}
      >
        <Button
          look="danger"
          onClick={skipTask}
          disabled={disabled}
          icon={<Icon icon={FaBan} />}
        >
          Skip
        </Button>
      </Tooltip>,
    );

    buttons.push(
      <Tooltip
        key="submit"
        title={submitShortcut}
        mouseEnterDelay={TOOLTIP_DELAY}
      >
        <Button
          look="primary"
          disabled={disabled}
          icon={<Icon icon={isNewTask ? FaCheck : FaCheckCircle} />}
          onClick={saveAnnotation}
        >
          {isNewTask || isLabelStream ? "Submit" : "Update"}
        </Button>
      </Tooltip>,
    );

    return <Space>{buttons}</Space>;
  },
)
Example #2
Source File: index.js    From FinDevs with MIT License 5 votes vote down vote up
// import Swal from 'sweetalert2'

export default function DevItem({ dev, deletar }) {
  // async function handleRemoveUser() {
  // await Swal.fire({
  //   title: 'Remover Usuário',
  // text: 'Você tem certeza que quer remover o usuário?',
  //  icon: 'warning',
  //  showCancelButton: true,
  //  cancelButtonColor: '#FF6E6E',
  //  confirmButtonColor: '#7159c1',
  //  reverseButtons: true,
  //   confirmButtonText: 'Sim, remover usuário!',
  //   cancelButtonText: 'Cancelar',
  // }).then(async result => {
  //   if (result.value) {
  //    await deletar(dev.github_user);
  //     Swal.fire('Removido!', 'Usuário removido com sucesso.', 'success');
  //   }
  //  });
  // }

  return (
    <li className="dev-item">
      <header>
        <img src={dev.avatar_url} alt={dev.name} />
        <div className="user-info">
          <strong>{dev.name}</strong>
          <span>{dev.techs.join(', ')}</span>
        </div>
      </header>

      <p>{dev.bio}</p>

      <div className="dev-buttons">
        <a
          id="github"
          href={`https://github.com/${dev.github_user}`}
          target="blank"
        >
          <button
            title={`Check ${dev.name}'s Github`}
            type="button"
          >
            <FaGithubAlt />
          </button>
        </a>
        <button
          className="map-button"
          title={`See ${dev.name} in the map!`}
          type="button"
          onClick={() => {
            alert('This feat is under construction for now!');
          }}

        >
          <FaMapMarkedAlt />
        </button>
        <button
          title={`Block ${dev.name}!`}
          type="button"
          onClick={() => {
            alert('This feat is under construction for now!');
          }}

        >
          <FaBan />
        </button>
      </div>
    </li>
  );
}