Implement design review changes

This commit is contained in:
Jorik Schellekens
2020-09-16 00:19:52 +01:00
parent 471c9cd21d
commit 4d456c2799
34 changed files with 450 additions and 114 deletions
+9 -7
View File
@@ -25,7 +25,6 @@ import ClientSelection from './ClientSelection';
import { Client, ClientKind } from '../clients/types';
import { SafeLink } from '../parser/types';
import TextButton from './TextButton';
import FakeProgress from './FakeProgress';
interface IProps {
children?: React.ReactNode;
@@ -39,10 +38,8 @@ const InviteTile: React.FC<IProps> = ({ children, client, link }: IProps) => {
let advanced: React.ReactNode;
if (client === null) {
invite = showAdvanced ? (
<FakeProgress />
) : (
<Button onClick={() => setShowAdvanced(!showAdvanced)}>
invite = showAdvanced ? null : (
<Button onClick={(): void => setShowAdvanced(!showAdvanced)}>
Accept invite
</Button>
);
@@ -89,7 +86,9 @@ const InviteTile: React.FC<IProps> = ({ children, client, link }: IProps) => {
if (client === null) {
advanced = (
<>
<h4>Pick an app to accept the invite with</h4>
<hr />
<h3>Almost done!</h3>
<p>Pick a client to open {link.identifier}</p>
<ClientSelection link={link} />
</>
);
@@ -104,12 +103,15 @@ const InviteTile: React.FC<IProps> = ({ children, client, link }: IProps) => {
}
}
advanced = advanced ? (
<div className="inviteTileClientSelection">{advanced}</div>
) : null;
return (
<>
<Tile className="inviteTile">
{children}
{invite}
<div className="inviteTileClientSelection">{advanced}</div>
{advanced}
</Tile>
</>
);