Skip to content

Commit c62a554

Browse files
committed
Update ContextMenu styles
1 parent 3453bbc commit c62a554

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

packages/app/src/app/components/ContextMenu/elements.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ import theme from 'common/theme';
44
export const Container = styled.div`
55
position: fixed;
66
7-
font-size: 0.875rem;
8-
background-color: ${() => theme.background2.lighten(0.2)()};
9-
color: ${() => theme.background2.lighten(3)()};
7+
font-size: 0.75rem;
8+
background-color: ${() => theme.background4()};
9+
color: rgba(255, 255, 255, 0.6);
1010
box-shadow: -1px 3px 4px rgba(0, 0, 0, 0.3);
1111
border-radius: 3px;
1212
z-index: 20;
1313
overflow: hidden;
1414
1515
transform-origin: 0% 0%;
16+
font-weight: 600;
1617
`;
1718

1819
export const Item = styled.div`
19-
transition: 0.3s ease all;
20-
padding: 0.75rem 1rem;
20+
transition: 0.2s ease all;
21+
display: flex;
22+
align-items: center;
23+
padding: 0.6rem 1rem;
2124
2225
border-bottom: 1px solid ${() => theme.background2()};
2326
border-left: 2px solid transparent;
@@ -26,7 +29,8 @@ export const Item = styled.div`
2629
min-width: 10rem;
2730
2831
svg {
29-
margin-right: 0.5rem;
32+
margin-right: 0.75rem;
33+
font-size: 0.75rem;
3034
}
3135
3236
&:last-child {

packages/app/src/app/components/ContextMenu/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,14 @@ class ContextMenu extends React.Component {
6363
>
6464
{show && (
6565
<Motion
66-
defaultStyle={{ size: 0.75, opacity: 0.6 }}
67-
style={{
68-
size: spring(1, { stiffness: 200, damping: 26 }),
69-
opacity: spring(1),
70-
}}
66+
defaultStyle={{ opacity: 0.6 }}
67+
style={{ opacity: spring(1) }}
7168
>
72-
{({ size, opacity }) => (
69+
{({ opacity }) => (
7370
<Container
7471
style={{
7572
left: x,
7673
top: y,
77-
transform: `scale(${size}, ${size})`,
7874
opacity,
7975
}}
8076
>

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as React from 'react';
22
import { DragSource } from 'react-dnd';
33
import ContextMenu from 'app/components/ContextMenu';
44

5-
import FileIcon from 'react-icons/lib/fa/file';
6-
import FolderIcon from 'react-icons/lib/fa/folder';
5+
import AddFileIcon from 'react-icons/lib/md/insert-drive-file';
6+
import AddDirectoryIcon from 'react-icons/lib/md/create-new-folder';
77
import EditIcon from 'react-icons/lib/go/pencil';
88
import DeleteIcon from 'react-icons/lib/go/trashcan';
99
import UploadFileIcon from 'react-icons/lib/md/file-upload';
@@ -95,14 +95,14 @@ class Entry extends React.PureComponent {
9595

9696
const items = [
9797
onCreateModuleClick && {
98-
title: 'New Module',
98+
title: 'Create File',
9999
action: onCreateModuleClick,
100-
icon: FileIcon,
100+
icon: AddFileIcon,
101101
},
102102
onCreateDirectoryClick && {
103-
title: 'New Directory',
103+
title: 'Create Directory',
104104
action: onCreateDirectoryClick,
105-
icon: FolderIcon,
105+
icon: AddDirectoryIcon,
106106
},
107107
onUploadFileClick && {
108108
title: 'Upload File',

0 commit comments

Comments
 (0)