forked from Standard-Hashrate-Group/btcst.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuide.tsx
More file actions
33 lines (30 loc) · 1.21 KB
/
Guide.tsx
File metadata and controls
33 lines (30 loc) · 1.21 KB
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
30
31
32
33
import React from "react";
import { View } from "react-native";
import { Spacing } from "../constants/dimension";
import useColors from "../hooks/useColors";
import useStyles from "../hooks/useStyles";
import Column from "./Column";
import Text from "./Text";
const Guide = (props: { hidden: boolean; text: string; buttonTitle: string; onPressButton: () => void }) => {
const { accent } = useColors();
const { border } = useStyles();
const borderStyle = border({ color: accent });
if (props.hidden) return <Column noTopMargin={true} />;
return (
<Column style={{ marginTop: Spacing.huge }}>
<View style={{ ...borderStyle, width: "100%", alignItems: "center" }}>
<Text note={true} style={{ color: borderStyle.borderColor }}>
{props.text}
</Text>
<Text
note={true}
fontWeight={"bold"}
style={{ textDecorationLine: "underline", color: borderStyle.borderColor, textAlign: "center" }}
onPress={props.onPressButton}>
{props.buttonTitle}
</Text>
</View>
</Column>
);
};
export default Guide;