Skip to content

Commit e353e3d

Browse files
committed
Fix profile page
1 parent 98a6018 commit e353e3d

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build:deps": "lerna run build:dev --scope codesandbox-api --scope @codesandbox/notifications --scope @codesandbox/executors && lerna run build:dev --scope @codesandbox/common && lerna run build:dev --scope vscode-textmate --scope codesandbox-browserfs --scope node-services && lerna run build:dev --scope sse-hooks && lerna run build --scope codesandbox-deps",
1616
"build:common": "lerna run build:dev --scope @codesandbox/common --stream",
1717
"build:dynamic": "lerna run build --scope dynamic-pages --stream",
18-
"start": "yarn build:deps && yarn start:fast",
18+
"start": "yarn build:deps && lerna run start --scope @codesandbox/common --scope app",
1919
"start:overmind": "yarn build:deps && concurrently \"lerna run start --scope app --stream\" \"overmind-devtools\"",
2020
"start:fast": "cd packages/app && yarn start",
2121
"start:vscode": "cross-env VSCODE=1 yarn start:fast & cd standalone-packages/monaco-editor && yarn simpleserver & cd standalone-packages/vscode && yarn watch",
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
import * as React from 'react';
2-
import DeleteIcon from 'react-icons/lib/md/delete';
3-
import { Container } from './elements';
2+
import { DeleteSandboxButtonContainer } from './elements';
43

5-
interface IDeleteSandboxButtonProps {
4+
interface Props {
65
id: string;
76
onDelete: (id: string) => void;
87
}
98

10-
export const DeleteSandboxButton: React.FC<IDeleteSandboxButtonProps> = ({
11-
id,
12-
onDelete,
13-
...props
14-
}) => (
15-
<Container content="Delete Sandbox" onClick={() => onDelete(id)}>
16-
<button type="button" {...props}>
17-
<DeleteIcon />
18-
</button>
19-
</Container>
20-
);
9+
export const DeleteSandboxButton = ({ id, onDelete }: Props) => {
10+
const deleteSandbox = () => {
11+
onDelete(id);
12+
};
13+
14+
return <DeleteSandboxButtonContainer onClick={deleteSandbox} />;
15+
};

packages/app/src/app/components/DeleteSandboxButton/elements.ts renamed to packages/app/src/app/components/DeleteSandboxButton/elements.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1+
import React from 'react';
12
import styled from 'styled-components';
3+
import DeleteIcon from 'react-icons/lib/md/delete';
24
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
35

4-
export const Container = styled(Tooltip)`
5-
padding: 5px 6px 9px 6px;
6-
border: none;
6+
export const DeleteSandboxButtonContainer = styled(props => (
7+
<Tooltip content="Delete Sandbox">
8+
<button {...props}>
9+
<DeleteIcon />
10+
</button>
11+
</Tooltip>
12+
))`
13+
font-size: 1.2em;
714
background-color: inherit;
15+
border: none;
16+
padding: 5px 6px 9px 6px;
817
color: rgba(255, 255, 255, 0.5);
9-
font-size: 1.2em;
1018
cursor: pointer;
11-
1219
&:hover {
1320
color: rgba(255, 255, 255, 1);
1421
}
15-
1622
&[disabled] {
1723
opacity: 0.5;
1824
cursor: default;

packages/common/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"scripts": {
1414
"test": "jest",
1515
"clean": "rimraf lib && yarn rimraf node_modules/@types/react-native",
16+
"install": "cd ../../ && yarn && yarn build:deps",
1617
"start": "(yarn tsc --watch & yarn babel src --out-dir lib --watch & yarn cpx \"src/**/*.{css,svg,png,jpg}\" lib --watch)",
1718
"start:storybook": "start-storybook",
1819
"build:storybook": "build-storybook -c .storybook -o public",

0 commit comments

Comments
 (0)