Skip to content

Commit 967ed36

Browse files
christineooSaraVieira
authored andcommitted
🔨 Refactored, Hacktober | Refactor app/src/app/pages/common/Mo… (codesandbox#2830)
* rename file ext to .tsx * fix type error - refactor to use style * change file ext to ts * fix type error - add optional prop * remove the unnecessary interface definition
1 parent a62cec4 commit 967ed36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/elements.js renamed to packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/elements.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { css } from 'styled-components';
22

3-
export const Block = styled.div`
3+
export const Block = styled.div<{ right?: boolean }>`
44
background-color: ${props => props.theme.background2};
55
color: rgba(255, 255, 255, 0.9);
66
padding: 1rem 1.5rem;

packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.js renamed to packages/app/src/app/pages/common/Modals/MoveSandboxFolderModal/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const MoveSandboxFolderModal = () => {
5757
return (
5858
<div>
5959
<Block>Move to Folder</Block>
60-
<Container css={{ maxHeight: 400, overflow: 'auto' }}>
60+
<Container style={{ maxHeight: 400, overflow: 'auto' }}>
6161
<DirectoryPicker
6262
onSelect={onSelect}
6363
currentTeamId={teamId}
@@ -72,7 +72,7 @@ const MoveSandboxFolderModal = () => {
7272

7373
<Button
7474
onClick={handleMove}
75-
css={{ display: 'inline-flex', alignItems: 'center' }}
75+
style={{ display: 'inline-flex', alignItems: 'center' }}
7676
small
7777
disabled={loading}
7878
>
@@ -85,7 +85,7 @@ const MoveSandboxFolderModal = () => {
8585
? basename(path)
8686
: `${teamId ? 'Our' : 'My'} Sandboxes`}
8787
<ChevronRight
88-
css={{ marginRight: '-.25rem', marginLeft: '.25rem' }}
88+
style={{ marginRight: '-.25rem', marginLeft: '.25rem' }}
8989
/>
9090
</>
9191
)}
@@ -95,4 +95,5 @@ const MoveSandboxFolderModal = () => {
9595
);
9696
};
9797

98+
// eslint-disable-next-line import/no-default-export
9899
export default MoveSandboxFolderModal;

0 commit comments

Comments
 (0)