Skip to content

Commit 683cf2c

Browse files
authored
re add enter to fork frozen modal (codesandbox#3746)
1 parent 83121ae commit 683cf2c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/app/src/app/pages/Sandbox/Editor/ForkFrozenSandboxModal/ForkFrozenSandboxModal.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import Modal from 'app/components/Modal';
22
import { withTheme } from 'styled-components';
3-
import { ThemeProvider } from '@codesandbox/components';
3+
import { ThemeProvider, Stack, Text } from '@codesandbox/components';
44
import { Alert } from 'app/pages/common/Modals/Common/Alert';
55
import { useOvermind } from 'app/overmind';
66
import React, { FunctionComponent } from 'react';
77
import useKeyPressEvent from 'react-use/lib/useKeyPressEvent';
8+
import ReturnIcon from 'react-icons/lib/md/keyboard-return';
89

910
const ModalContent: React.FC = () => {
1011
const {
@@ -45,7 +46,12 @@ const ModalContent: React.FC = () => {
4546
onCancel={unlock}
4647
cancelMessage="Unfreeze"
4748
onPrimaryAction={fork}
48-
confirmMessage="Fork"
49+
confirmMessage={
50+
<Stack gap={2} align="center">
51+
<Text size={3}>Fork</Text>
52+
<ReturnIcon />
53+
</Stack>
54+
}
4955
/>
5056
);
5157
};

packages/app/src/app/pages/common/Modals/Common/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type Props = {
66
onCancel?: () => void;
77
onPrimaryAction?: () => void;
88
cancelMessage?: string;
9-
confirmMessage?: string;
9+
confirmMessage?: string | React.ReactNode;
1010
title?: string;
1111
description?: string | React.ReactNode;
1212
type?: 'link' | 'primary' | 'danger' | 'secondary';

0 commit comments

Comments
 (0)