rn-inkpad
Version:
<img src="https://res.cloudinary.com/fercloudinary/image/upload/v1715452841/packages/inkpad-banner_acl0xl.png" />
24 lines (23 loc) • 1.11 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CircleAvatar = void 0;
const react_1 = __importDefault(require("react"));
const react_native_1 = require("react-native");
const CircleAvatar = ({ backgroundColor = '#373099', defaultText = 'AA', fontSize = 26, image, onPress, size = 50, textColor = '#FFFFFF', }) => {
return (<react_native_1.Pressable onPress={onPress} style={{
height: size,
width: size,
backgroundColor: backgroundColor,
borderRadius: size,
justifyContent: 'center',
alignItems: 'center',
}}>
{!!image ? (<react_native_1.Image style={{ height: size, width: size, borderRadius: size }} source={image}/>) : (<react_native_1.Text style={{ color: textColor, fontSize, fontWeight: '600' }}>
{defaultText.slice(0, 2)}
</react_native_1.Text>)}
</react_native_1.Pressable>);
};
exports.CircleAvatar = CircleAvatar;