Skip to content

Commit 090fc9b

Browse files
authored
deprecated: tokens and new token banner (supabase#31006)
* new token banner * tokens banner
1 parent b862a74 commit 090fc9b

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

apps/studio/components/interfaces/Account/NewTokenBanner.tsx

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
import { NewAccessToken } from 'data/access-tokens/access-tokens-create-mutation'
2-
import { Alert, Input } from 'ui'
2+
import { Input } from 'ui'
3+
import { Admonition } from 'ui-patterns'
34

45
interface NewTokenBannerProps {
56
token: NewAccessToken
67
}
78

89
const NewTokenBanner = ({ token }: NewTokenBannerProps) => {
910
return (
10-
<Alert withIcon variant="success" title="Successfully generated a new token!">
11-
<div className="w-full space-y-2">
12-
<p className="text-sm">
13-
Do copy this access token and store it in a secure place - you will not be able to see it
14-
again.
15-
</p>
16-
<Input
17-
copy
18-
readOnly
19-
size="small"
20-
className="max-w-xl input-mono"
21-
value={token.token}
22-
onChange={() => {}}
23-
/>
24-
</div>
25-
</Alert>
11+
<Admonition
12+
type="default"
13+
title="Successfully generated a new token!"
14+
description={
15+
<>
16+
<div className="w-full space-y-2">
17+
<p className="text-sm">
18+
Do copy this access token and store it in a secure place - you will not be able to see
19+
it again.
20+
</p>
21+
<Input
22+
copy
23+
readOnly
24+
size="small"
25+
className="max-w-xl input-mono"
26+
value={token.token}
27+
onChange={() => {}}
28+
/>
29+
</div>
30+
</>
31+
}
32+
/>
2633
)
2734
}
2835

apps/studio/pages/account/tokens.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import AccountLayout from 'components/layouts/AccountLayout/AccountLayout'
1010
import { FormHeader } from 'components/ui/Forms/FormHeader'
1111
import { NewAccessToken } from 'data/access-tokens/access-tokens-create-mutation'
1212
import type { NextPageWithLayout } from 'types'
13-
import { Alert, Button } from 'ui'
13+
import { Button } from 'ui'
1414
import { ExternalLink } from 'lucide-react'
15+
import { Admonition } from 'ui-patterns'
1516

1617
const UserAccessTokens: NextPageWithLayout = () => {
1718
const [newToken, setNewToken] = useState<NewAccessToken | undefined>()
@@ -50,11 +51,10 @@ const UserAccessTokens: NextPageWithLayout = () => {
5051
</div>
5152
</div>
5253
<div className="flex items-center justify-between">
53-
<Alert
54-
withIcon
55-
className="mb-6 w-full"
56-
variant="warning"
54+
<Admonition
55+
type="warning"
5756
title="Personal access tokens can be used to control your whole account and use features added in the future. Be careful when sharing them!"
57+
className="mb-6 w-full"
5858
/>
5959
</div>
6060
<div className="space-y-4">

0 commit comments

Comments
 (0)