Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/top-flex-box-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
6 changes: 6 additions & 0 deletions apps/top-flex-box-example/client/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
["@babel/preset-env", { "targets": "> 0.25%, not dead" }],
"@babel/preset-react"
]
}
51 changes: 51 additions & 0 deletions apps/top-flex-box-example/client/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
function App() {
return (
<Sandpack
files={{
"styles.css": {
active: true,
code: `
.flex-container {
/* display: flex; */
gap: 12px;
}

/* this selector selects all divs inside of .flex-container */
.flex-container div {
background: peachpuff;
border: 4px solid brown;
height: 100px;
/* flex: 1; */
}
`
},
"index.html": {
code: `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="flex-container">
<div class="one"></div>
<div class="two"></div>
<div class="three"></div>
</div>
</body>
</html>`
},
}}
options={{
editorHeight: "100vh",
}}
theme={'dark'}
template="static"
/>
);
}

export default App;
16 changes: 16 additions & 0 deletions apps/top-flex-box-example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>

<head>
<link rel="stylesheet" href="styles.css" />
<title>The Odin Project Flexbox Example</title>
</head>

<body>
<div id="app"></div>
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
<script src="bundle.js"></script>
</body>

</html>
Loading