react-bate-terminal
v1.0.6
Published
Made with create-react-library
Downloads
4
Readme
react-b-terminal
Made with create-react-library
Install
npm install --save react-bate-terminal --force
Usage
import React ,{ useState } from 'react'
import { BTerminal } from 'react-bate-terminal'
function myComponent(){
const [show, setShow] = useState(false)
const data = [{
command : "hello",
output: "world"
},
{
command: "mail",
output: () => {/* when you are creating funcion this will execute when your command input
like this */
alert("hello world!");
}
},
{
command : "close",
output: "close"
},
{
command : "help",
output : "this is help message for your terminal"
}
]
const close = () =>{ // command is close and exit this is default
setShow(false);
}
return <BTerminal close={close} main="this is main text" data={data} />
}