Skip to content

Commit 521cf45

Browse files
authored
chore: add more info about cloud sandboxes through a tooltip (#7612)
1 parent a73a37f commit 521cf45

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

packages/app/src/app/components/CreateSandbox/TemplateCard.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Text,
88
} from '@codesandbox/components';
99
import { getTemplateIcon } from '@codesandbox/common/lib/utils/getTemplateIcon';
10+
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
1011
import { TemplateFragment } from 'app/graphql/types';
1112
import { VisuallyHidden } from 'reakit/VisuallyHidden';
1213
import { useAppState } from 'app/overmind';
@@ -91,7 +92,28 @@ export const TemplateCard = ({
9192
{isOfficial && (
9293
<Badge icon={isV2 ? 'cloud' : undefined}>Official</Badge>
9394
)}
94-
{!isOfficial && isV2 && <Badge icon="cloud">Cloud</Badge>}
95+
{!isOfficial && isV2 && (
96+
<Tooltip
97+
content={
98+
<div style={{ fontSize: 13 }}>
99+
This is a cloud sandbox that runs in a microVM, learn more{' '}
100+
<a
101+
href="https://codesandbox.io/docs/learn/sandboxes/overview?tab=cloud"
102+
target="_blank"
103+
rel="noreferrer noopener"
104+
>
105+
here
106+
</a>
107+
.
108+
</div>
109+
}
110+
interactive
111+
>
112+
<div>
113+
<Badge icon="cloud">Cloud</Badge>
114+
</div>
115+
</Tooltip>
116+
)}
95117
</Stack>
96118
<Stack direction="vertical" gap={1}>
97119
<Text

0 commit comments

Comments
 (0)