Newer
Older
CrypticOreWallet / src / pages / dashboard / Statistic.tsx
@Drew Lemmy Drew Lemmy on 20 Feb 2021 485 bytes feat: wallet overview on dashboard
import React from "react";

import { useTranslation } from "react-i18next";

interface Props {
  title?: string;
  titleKey?: string;
  value?: React.ReactNode;
}

export function Statistic({ title, titleKey, value }: Props): JSX.Element {
  const { t } = useTranslation();

  return <div className="dashboard-statistic">
    <span className="dashboard-statistic-title">{titleKey ? t(titleKey) : title}</span>
    <span className="dashboard-statistic-value">{value}</span>
  </div>;
}