"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const components_1 = require("../themes/components");
function PeerName({ name, charSize, }) {
    const truncate = (name, size) => {
        if (name.length > size) {
            return `${name.substring(0, size)}...`;
        }
        return name;
    };
    return (react_1.default.createElement(components_1.Text, null, truncate(name, charSize)));
}
exports.default = PeerName;
PeerName.defaultProps = {
    charSize: 15,
};
//# sourceMappingURL=PeerName.js.map