28 lines
655 B
TypeScript
28 lines
655 B
TypeScript
import React, { FC } from "react";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
import { TouchableOpacity } from "react-native";
|
|
type SimpleDotProps = {
|
|
active: boolean;
|
|
onPress: () => void;
|
|
};
|
|
export const SimpleDot: FC<SimpleDotProps> = (props) => {
|
|
const { active, onPress } = props;
|
|
return (
|
|
<TouchableOpacity
|
|
style={{
|
|
width: 20,
|
|
marginHorizontal: 2,
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
}}
|
|
onPress={onPress}
|
|
>
|
|
<Ionicons
|
|
name="ellipse"
|
|
size={active ? 20 : 14}
|
|
color={active ? "#00b8ff" : "#00b8ff55"}
|
|
/>
|
|
</TouchableOpacity>
|
|
);
|
|
};
|