import React from 'react';
import { Text } from '../themes/components';
export default function PeerName({ name, charSize, }) {
    const truncate = (name, size) => {
        if (name.length > size) {
            return `${name.substring(0, size)}...`;
        }
        return name;
    };
    return (<Text>
			{truncate(name, charSize)}
		</Text>);
}
PeerName.defaultProps = {
    charSize: 15,
};
//# sourceMappingURL=PeerName.js.map