File tree Expand file tree Collapse file tree 2 files changed +25
-15
lines changed
Expand file tree Collapse file tree 2 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -171,23 +171,33 @@ function OutputPane() {
171171 ) ;
172172}
173173
174+ function PlaygroundNavbar ( ) {
175+ const tstlLink = "https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/CHANGELOG.md" ;
176+ const tsMajor = tsVersion . split ( "." ) [ 0 ] ;
177+ const tsMinor = tsVersion . split ( "." ) [ 1 ] ;
178+ const tsLink = `https://www.typescriptlang.org/docs/handbook/release-notes/typescript-${ tsMajor } -${ tsMinor } .html` ;
179+
180+ return (
181+ < nav className = { styles . navbar } >
182+ < div className = { styles . navbarVersions } >
183+ TSTL{ " " }
184+ < a href = { tstlLink } target = "_blank" rel = "noopener" >
185+ < b > v{ tstlVersion } </ b >
186+ </ a >
187+ < br />
188+ TS{ " " }
189+ < a href = { tsLink } target = "_blank" rel = "noopener" >
190+ < b > v{ tsVersion } </ b >
191+ </ a >
192+ </ div >
193+ </ nav >
194+ ) ;
195+ }
196+
174197export default function Playground ( ) {
175198 return (
176199 < >
177- < nav className = { styles . navbar } >
178- < div className = { styles . navbarVersion } >
179- TSTL{ " " }
180- < a
181- href = "https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/CHANGELOG.md"
182- target = "_blank"
183- rel = "noopener"
184- >
185- < b > v{ tstlVersion } </ b >
186- </ a >
187- < br />
188- TS < b > v{ tsVersion } </ b >
189- </ div >
190- </ nav >
200+ < PlaygroundNavbar />
191201 < div className = { styles . content } >
192202 < EditorContextProvider >
193203 < InputPane />
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ $navbar-height: 50px;
4040 align-items : center ;
4141}
4242
43- .navbarVersion {
43+ .navbarVersions {
4444 line-height : 1.25 ;
4545 font-size : 14px ;
4646 font-family : monospace ;
You can’t perform that action at this time.
0 commit comments