forked from Standard-Hashrate-Group/btcst.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAmountMeta.tsx
More file actions
29 lines (25 loc) · 890 Bytes
/
AmountMeta.tsx
File metadata and controls
29 lines (25 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, { FC } from "react";
import { IS_DESKTOP, Spacing } from "../constants/dimension";
import useColors from "../hooks/useColors";
import useTranslation from "../hooks/useTranslation";
import Text from "./Text";
export interface AmountMetaProps {
amount?: string;
suffix?: string;
disabled?: boolean;
}
const AmountMeta: FC<AmountMetaProps> = props => {
const t = useTranslation();
const { textDark, textLight, placeholder } = useColors();
return (
<Text
style={{
fontSize: IS_DESKTOP ? 28 : 20,
marginBottom: Spacing.normal,
color: props.disabled ? placeholder : props.amount ? textDark : textLight
}}>
{props.disabled ? t("n/a") : props.amount ? props.amount + " " + (props.suffix || "") : t("fetching")}
</Text>
);
};
export default AmountMeta;