This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, *:before, *:after { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: 'Lato', sans-serif; | |
color: #333; | |
background-color: #f8f8f9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ | |
/** | |
* 1. Set default font family to sans-serif. | |
* 2. Prevent iOS text size adjust after orientation change, without disabling | |
* user zoom. | |
*/ | |
html { | |
font-family: sans-serif; /* 1 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Suspense, lazy, memo, Children } from 'react'; | |
import { createFileMap } from './createFileMap'; | |
const SandpackRoot = lazy(() => import('./SandpackRoot')); | |
type PlaygroundProps = { | |
children: React.ReactNode; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { SandpackFile } from '@codesandbox/sandpack-react'; | |
export const createFileMap = (codeSnippets: React.ReactElement[]) => { | |
return codeSnippets.reduce( | |
(result: Record<string, SandpackFile>, codeSnippet: React.ReactElement) => { | |
if (codeSnippet.type !== 'pre') { | |
return result; | |
} | |
const { props } = codeSnippet.props.children; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, *:before, *:after { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
body { | |
font-family: 'Lato', sans-serif; | |
color: #333; | |
font-weight: 400; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*, | |
*::after, | |
*::before { | |
margin: 0; | |
padding: 0; | |
box-sizing: inherit; | |
} | |
html { | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,400i|Nunito:300,300i" rel="stylesheet"> | |
<link rel="stylesheet" href="css/style.css"> | |
<link rel="shortcut icon" type="image/png" href="img/favicon.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const teachers = [ | |
{ id: 1, name: 'Abhishek', subject: 'React' }, | |
{ id: 2, name: 'Aakash', subject: 'JavaScript' } | |
] | |
const Description = () => ( | |
<dl> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import TableColumns from './TableColumns'; | |
const teachers = [ | |
{ id: 1, name: 'Abhishek', subject: 'React' }, | |
{ id: 2, name: 'Aakash', subject: 'JavaScript' } | |
] | |
const Table = () => ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const TableColumns = (props) => { | |
const { name, subject } = props; | |
return ( | |
<div> | |
<td>{name}</td> | |
<td>{subject}</td> | |
</div> |
NewerOlder