1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00

Add Typography components

This commit is contained in:
Quentin Gliech
2022-11-15 16:57:06 +01:00
parent 2822e114e3
commit 3f6f060a61
4 changed files with 180 additions and 10 deletions

View File

@@ -14,6 +14,7 @@
import type { OAuth2Session_session$key } from "./__generated__/OAuth2Session_session.graphql";
import { graphql, useFragment } from "react-relay";
import Typography, { Bold, Code } from "./Typography";
type Props = {
session: OAuth2Session_session$key;
@@ -39,18 +40,18 @@ const OAuth2Session: React.FC<Props> = ({ session }) => {
return (
<div className="p-2 my-1 bg-grey-50 dark:bg-grey-450 dark:text-white rounded">
<div>
Client ID:{" "}
<span className="font-mono text-sm">{data.client.clientId}</span>
<Typography variant="body">
Client ID: <Code>{data.scope}</Code>
</Typography>
</div>
{data.client.clientName && (
<div>
Client name:{" "}
<span className="font-semibold">{data.client.clientName}</span>
</div>
<Typography variant="body">
Client name: <Bold>{data.client.clientName}</Bold>
</Typography>
)}
<div>
Scope: <span className="font-mono text-sm">{data.scope}</span>
</div>
<Typography variant="body">
Scope: <Code>{data.scope}</Code>
</Typography>
</div>
);
};