From f707d3d524d8d16e2bb780764f029d85fc57ecc0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 26 Jul 2019 13:22:00 +0300 Subject: prop-types -> jsdoc --- vnext/src/ui/Contact.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'vnext/src/ui/Contact.js') diff --git a/vnext/src/ui/Contact.js b/vnext/src/ui/Contact.js index 24aabe15..9e6416bb 100644 --- a/vnext/src/ui/Contact.js +++ b/vnext/src/ui/Contact.js @@ -1,10 +1,18 @@ import React from 'react'; -import PropTypes from 'prop-types'; -import { UserType } from './Types'; import Avatar from './Avatar'; -function Contact({ user, style, ...rest }) { +/** + * @typedef {Object} ContactProps + * @property {import('../api').Chat} user + * @property {React.CSSProperties} style + */ + +/** + * Contact component + * @param {ContactProps} props + */ +function Contact({ user, style }) { return ( {user.unreadCount && {user.unreadCount}} @@ -14,8 +22,3 @@ function Contact({ user, style, ...rest }) { } export default React.memo(Contact); - -Contact.propTypes = { - user: UserType, - style: PropTypes.object -}; -- cgit v1.2.3