Files
outline/app/scenes/CollectionPermissions/components/UserListItem.js
Tom Moor 5bd2409e39 Revert "WIP"
This reverts commit ccfad1d800.
2019-08-28 00:03:11 -07:00

33 lines
667 B
JavaScript

// @flow
import * as React from 'react';
import Avatar from 'components/Avatar';
import Button from 'components/Button';
import ListItem from 'components/List/Item';
import User from 'models/User';
type Props = {
user: User,
showAdd: boolean,
onAdd: () => void,
};
const UserListItem = ({ user, onAdd, showAdd }: Props) => {
return (
<ListItem
title={user.name}
image={<Avatar src={user.avatarUrl} size={32} />}
actions={
showAdd ? (
<Button type="button" onClick={onAdd} neutral>
Invite
</Button>
) : (
undefined
)
}
/>
);
};
export default UserListItem;