import { StyleSheet, View, ViewProps, ViewStyle } from "react-native";
import React from "react";
import { useTheme } from "../../utils/Theme";
/**
* @interface
* @param {number} radius - The radius of the circle.
* @param {string} backgroundColor - The background color of the circle
**/
export interface SafecamCircleProps extends ViewProps {
radius?: number;
backgroundColor?: string;
}
/**
* @component
* Represents a Circle instance
* @param {number} radius - The radius of the circle.
* @param {string} backgroundColor - The background color of the circle
* @example
*
*/
const SafecamCircle: React.FC = ({
radius = 10,
backgroundColor = "gray",
...props
}) => {
const { circle } = useTheme();
const styles = StyleSheet.create({
root: {
...circle?.style,
...(props.style as ViewStyle),
height: radius,
width: radius,
backgroundColor,
borderRadius: radius / 2,
},
});
return (
{props.children}
);
};
export default SafecamCircle;