Component created

This commit is contained in:
jubitjohn 2023-06-12 23:33:04 +05:30
parent 369e03bccf
commit 0d198afe97

View file

@ -0,0 +1,26 @@
import React from 'react';
interface CircleProps {
letter: string;
color: string;
size: number;
}
const Circle: React.FC<CircleProps> = ({ letter, color, size }) => {
const circleStyle = {
width: `${size}px`,
height: `${size}px`,
backgroundColor: color,
borderRadius: '50%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
color: '#fff',
fontWeight: 'bold',
fontSize: `${Math.floor(size / 2)}px`,
};
return <div style={circleStyle}>{letter}</div>;
};
export default Circle;