change(ui) - user list tooltip
This commit is contained in:
parent
c4b371507d
commit
59fe8245dd
3 changed files with 25 additions and 12 deletions
|
|
@ -37,8 +37,6 @@ function UsersView(props: Props) {
|
|||
}
|
||||
}, []);
|
||||
|
||||
console.log('remaining', limits, reachedLimit)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex items-center justify-between">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
//@ts-nocheck
|
||||
import React from 'react';
|
||||
import { Icon, CopyButton } from 'UI';
|
||||
import { Icon } from 'UI';
|
||||
import { checkForRecent } from 'App/date';
|
||||
import { Tooltip } from 'react-tippy';
|
||||
|
||||
interface Props {
|
||||
user: any;
|
||||
|
|
@ -30,18 +32,32 @@ function UserListItem(props: Props) {
|
|||
<div className="col-span-2">
|
||||
<span>{user.createdAt && checkForRecent(user.createdAt, 'LLL dd, yyyy, hh:mm a')}</span>
|
||||
</div>
|
||||
{/* invisible */}
|
||||
<div className="col-span-2 justify-self-end group-hover:visible">
|
||||
|
||||
<div className="col-span-2 justify-self-end invisible group-hover:visible">
|
||||
<div className="grid grid-cols-2 gap-3 items-center justify-end">
|
||||
{!user.isJoined && user.invitationLink ? (
|
||||
<button className='' onClick={copyInviteCode}>
|
||||
<Icon name="link-45deg" size="16" color="teal"/>
|
||||
</button>
|
||||
<Tooltip
|
||||
delay={500}
|
||||
arrow
|
||||
title="Copy Invite Code"
|
||||
hideOnClick={true}
|
||||
>
|
||||
<button className='' onClick={copyInviteCode}>
|
||||
<Icon name="link-45deg" size="16" color="teal"/>
|
||||
</button>
|
||||
</Tooltip>
|
||||
) : <div/>}
|
||||
{!user.isJoined && user.isExpiredInvite && (
|
||||
<button className='' onClick={generateInvite}>
|
||||
<Icon name="link-45deg" size="16" color="red"/>
|
||||
</button>
|
||||
<Tooltip
|
||||
delay={500}
|
||||
arrow
|
||||
title="Generate Invite"
|
||||
hideOnClick={true}
|
||||
>
|
||||
<button className='' onClick={generateInvite}>
|
||||
<Icon name="link-45deg" size="16" color="red"/>
|
||||
</button>
|
||||
</Tooltip>
|
||||
)}
|
||||
<button className='' onClick={editHandler}>
|
||||
<Icon name="pencil" color="teal" size="16" />
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ export default class User implements IUser {
|
|||
}
|
||||
|
||||
updateKey(key: string, value: any) {
|
||||
console.log(key, value)
|
||||
runInAction(() => {
|
||||
this[key] = value
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue