File tree Expand file tree Collapse file tree 4 files changed +34
-26
lines changed
Expand file tree Collapse file tree 4 files changed +34
-26
lines changed Original file line number Diff line number Diff line change 1- import styled from 'styled-components' ;
2- import css from '@styled-system/css' ;
31import CommonStats from '@codesandbox/common/lib/components/Stats' ;
42import { CenteredText } from '@codesandbox/common/lib/components/Stats/Stat/elements' ;
3+ import css from '@styled-system/css' ;
4+ import styled from 'styled-components' ;
55
66export const Container = styled . div (
77 css ( {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { Sandbox } from '@codesandbox/common/lib/types' ;
2+ import { getSandboxName } from '@codesandbox/common/lib/utils/get-sandbox-name' ;
3+ import React , { FunctionComponent } from 'react' ;
4+
5+ import AvatarBlock from '../AvatarBlock' ;
6+
7+ import { Container , Description , Stats , Title } from './elements' ;
8+
9+ type Props = {
10+ sandbox : Sandbox ;
11+ } ;
12+ export const SandboxInfo : FunctionComponent < Props > = ( { sandbox } ) => {
13+ const title = getSandboxName ( sandbox ) ;
14+
15+ return (
16+ < Container >
17+ < Title title = { title } > { title } </ Title >
18+
19+ { sandbox . description && < Description > { sandbox . description } </ Description > }
20+
21+ { sandbox . author && (
22+ < AvatarBlock
23+ url = { sandbox . author . avatarUrl }
24+ name = { sandbox . author . username }
25+ />
26+ ) }
27+
28+ < Stats { ...sandbox } />
29+ </ Container >
30+ ) ;
31+ } ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as React from 'react';
22import type { Sandbox } from '@codesandbox/common/lib/types' ;
33
44import Section from './Section' ;
5- import SandboxInfo from './SandboxInfo' ;
5+ import { SandboxInfo } from './SandboxInfo' ;
66import FileTree from './FileTree' ;
77import Dependencies from './Dependencies' ;
88import ExternalResources from './ExternalResources' ;
You can’t perform that action at this time.
0 commit comments