jrshikoku/components/Menu/SimpleDot.tsx
harukin-expo-dev-env f4dca5cd87 修正
2025-02-05 14:15:52 +00:00

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>
);
};