react-icons/fa#FaCheckCircle TypeScript Examples

The following examples show how to use react-icons/fa#FaCheckCircle. 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: Toast.tsx    From convoychat with GNU General Public License v3.0 6 votes vote down vote up
toast = {
  error: (message: string) => {
    notify.addNotification({
      type: "warning",
      content: (
        <Toast type="warning" icon={FaExclamationCircle}>
          {message}
        </Toast>
      ),
      ...(defaultConfig as any),
    });
  },
  success: (message: string) => {
    notify.addNotification({
      type: "success",
      content: (
        <Toast type="success" icon={FaCheckCircle}>
          {message}
        </Toast>
      ),
      ...(defaultConfig as any),
    });
  },
  info: (message: string) => {
    notify.addNotification({
      type: "info",
      content: (
        <Toast type="info" icon={FaInfoCircle}>
          {message}
        </Toast>
      ),
      ...(defaultConfig as any),
    });
  },
}
Example #2
Source File: getStatusIconAndText.ts    From nextclade with MIT License 5 votes vote down vote up
SuccessIcon = styled(FaCheckCircle)`
  margin-bottom: 2px;
  width: 1rem;
  height: 1rem;
  color: ${(props) => props.theme.success};
  padding-right: 2px;
  filter: drop-shadow(2px 1px 2px rgba(0, 0, 0, 0.2));
`
Example #3
Source File: index.tsx    From interbtc-ui with Apache License 2.0 4 votes vote down vote up
ConfirmedIssueRequest = ({ request }: Props): JSX.Element => {
  const { t } = useTranslation();
  const { bridgeLoaded } = useSelector((state: StoreType) => state.general);

  const queryParams = useQueryParams();
  const selectedPage = Number(queryParams.get(QUERY_PARAMETERS.PAGE)) || 1;
  const selectedPageIndex = selectedPage - 1;

  const queryClient = useQueryClient();
  // TODO: should type properly (`Relay`)
  const executeMutation = useMutation<void, Error, any>(
    (variables: any) => {
      if (!variables.backingPayment.btcTxId) {
        throw new Error('Bitcoin transaction ID not identified yet.');
      }
      return window.bridge.issue.execute(variables.id, variables.backingPayment.btcTxId);
    },
    {
      onSuccess: (_, variables) => {
        queryClient.invalidateQueries([ISSUE_FETCHER, selectedPageIndex * TABLE_PAGE_LIMIT, TABLE_PAGE_LIMIT]);
        toast.success(t('issue_page.successfully_executed', { id: variables.id }));
      }
    }
  );

  // TODO: should type properly (`Relay`)
  const handleExecute = (request: any) => () => {
    if (!bridgeLoaded) return;

    executeMutation.mutate(request);
  };

  return (
    <>
      <RequestWrapper className='px-12'>
        <h2 className={clsx('text-3xl', 'font-medium', 'text-interlayConifer')}>{t('confirmed')}</h2>
        <FaCheckCircle className={clsx('w-40', 'h-40', 'text-interlayConifer')} />
        <p className='space-x-1'>
          <span
            className={clsx(
              { 'text-interlayTextSecondaryInLightMode': process.env.REACT_APP_RELAY_CHAIN_NAME === POLKADOT },
              { 'dark:text-kintsugiTextSecondaryInDarkMode': process.env.REACT_APP_RELAY_CHAIN_NAME === KUSAMA }
            )}
          >
            {t('issue_page.btc_transaction')}:
          </span>
          <span className='font-medium'>{shortAddress(request.backingPayment.btcTxId || '')}</span>
        </p>
        <ExternalLink className='text-sm' href={`${BTC_EXPLORER_TRANSACTION_API}${request.backingPayment.btcTxId}`}>
          {t('issue_page.view_on_block_explorer')}
        </ExternalLink>
        <p
          className={clsx(
            'text-justify',
            { 'text-interlayTextSecondaryInLightMode': process.env.REACT_APP_RELAY_CHAIN_NAME === POLKADOT },
            { 'dark:text-kintsugiTextSecondaryInDarkMode': process.env.REACT_APP_RELAY_CHAIN_NAME === KUSAMA }
          )}
        >
          {t('issue_page.receive_interbtc_tokens', {
            wrappedTokenSymbol: WRAPPED_TOKEN_SYMBOL
          })}
        </p>
        <InterlayDenimOrKintsugiMidnightOutlinedButton
          pending={executeMutation.isLoading}
          onClick={handleExecute(request)}
        >
          {t('issue_page.claim_interbtc', {
            wrappedTokenSymbol: WRAPPED_TOKEN_SYMBOL
          })}
        </InterlayDenimOrKintsugiMidnightOutlinedButton>
      </RequestWrapper>
      {executeMutation.isError && executeMutation.error && (
        <ErrorModal
          open={!!executeMutation.error}
          onClose={() => {
            executeMutation.reset();
          }}
          title='Error'
          description={
            typeof executeMutation.error === 'string' ? executeMutation.error : executeMutation.error.message
          }
        />
      )}
    </>
  );
}