Skip to content

Commit e3b0f20

Browse files
committed
Update libs
1 parent 38715f9 commit e3b0f20

File tree

9 files changed

+42
-67
lines changed

9 files changed

+42
-67
lines changed

material-go-playground/example/index.jsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ func main() {
1717
}
1818
}`;
1919

20-
function Logo({style}) {
20+
function Logo({style, color = '#00acd7'}) {
2121
return <svg height="20" viewBox="0 0 207 78" xmlns="http://www.w3.org/2000/svg" style={style}>
22-
<g fill="#fff" fillRule="evenodd">
22+
<g fill={color} fillRule="evenodd">
2323
<path d="m16.2 24.1c-.4 0-.5-.2-.3-.5l2.1-2.7c.2-.3.7-.5 1.1-.5h35.7c.4 0 .5.3.3.6l-1.7 2.6c-.2.3-.7.6-1 .6z"/>
2424
<path d="m1.1 33.3c-.4 0-.5-.2-.3-.5l2.1-2.7c.2-.3.7-.5 1.1-.5h45.6c.4 0 .6.3.5.6l-.8 2.4c-.1.4-.5.6-.9.6z"/>
2525
<path d="m25.3 42.5c-.4 0-.5-.3-.3-.6l1.4-2.5c.2-.3.6-.6 1-.6h20c.4 0 .6.3.6.7l-.2 2.4c0 .4-.4.7-.7.7z"/>
@@ -39,8 +39,9 @@ function App() {
3939
const _height = height - (width > 500 ? 64 : 56) - 8;
4040

4141
return <GoPlayground
42-
title={width > 500 ? "The Go playground" : (width < 350 ? null : <Logo style={{position: "relative", top: 4, left: -4}}/>)}
42+
title={width > 500 ? "The Go playground" : (width < 350 ? null : <Logo color="#fff" style={{position: "relative", top: 4, left: -4}}/>)}
4343
code={code}
44+
color={localStorage.getItem('color') || 'light'}
4445
appendButtons={(
4546
<ShareButton
4647
path="share"
@@ -52,6 +53,18 @@ function App() {
5253
useTextOnButton={width > 500}
5354
editorHeight={_height * 0.7}
5455
resultHeight={_height * 0.3}
56+
onColorChange={(color) => {
57+
localStorage.setItem('color', color)
58+
}}
59+
onRun={()=>{
60+
console.log('Run started')
61+
}}
62+
onFormat={()=>{
63+
console.log('Format started')
64+
}}
65+
onImportFormat={(val) => {
66+
localStorage.setItem('imports', val)
67+
}}
5568
/>
5669
}
5770

material-go-playground/example/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material-go-playground/example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@material-ui/core": "^4.3.2",
2121
"@material-ui/icons": "^4.2.1",
2222
"@material-ui/styles": "^4.3.0",
23-
"material-go-playground": "^0.2.5",
23+
"material-go-playground": "^0.2.8",
2424
"react": "^16.8.6",
2525
"react-dom": "^16.8.6"
2626
},

material-go-playground/example/vendors.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material-go-playground/example/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5190,10 +5190,10 @@ map-visit@^1.0.0:
51905190
dependencies:
51915191
object-visit "^1.0.0"
51925192

5193-
material-go-playground@^0.2.5:
5194-
version "0.2.5"
5195-
resolved "https://registry.yarnpkg.com/material-go-playground/-/material-go-playground-0.2.5.tgz#9e3f9e197805e8bdcfc01407d8d75fe8fe3ee98a"
5196-
integrity sha512-AQXqrEHEgUZ8k3V4v2yRuiFAnP3pYmEIdNULnHEdh+MTC73y7bCO6X02CVQGf8zzU6oLJfRoSotOzBvnb9hzFQ==
5193+
material-go-playground@^0.2.8:
5194+
version "0.2.8"
5195+
resolved "https://registry.yarnpkg.com/material-go-playground/-/material-go-playground-0.2.8.tgz#63dbb2b04aeb988aaeb6ea6e7f55f7e8b7b7b6a7"
5196+
integrity sha512-B+H3zKF6aIfAo6IDjDAvgIJrRpeQjZJyEYOHOSipcinsT+0jkz8jqYgZwdw9pTDku6UNedkrcfewhARvrFKCPw==
51975197
dependencies:
51985198
"@material-ui/icons" "^4.2.1"
51995199
codemirror "^5.48.2"

0 commit comments

Comments
 (0)