Closed PedroNestor2077 closed 3 years ago
You can set the height and width in the style attributes of the wrapper div and the Terminal element, for example (see "height"):
return ( <div style={{ height: "50vh" }} > <Terminal color='green' backgroundColor='black' barColor='black' style={{ fontWeight: "bold", fontSize: "1em", height: "50vh" }} commands={{ 'open-google': () => window.open('https://www.google.com/', '_blank'), showmsg: this.showMsg, popup: () => alert('Terminal in React') }} descriptions={{ 'open-google': 'opens google.com', showmsg: 'shows a message', alert: 'alert', popup: 'alert' }} msg='You can write anything here. Example - Hello! My name is Foo and I like Bar.' /> </div> ); }
You can set the height and width in the style attributes of the wrapper div and the Terminal element, for example (see "height"):