1.0.6 • Published 2 years ago

react-bate-terminal v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-b-terminal

Made with create-react-library

NPM JavaScript Style Guide

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} />
  
}

License

MIT © https://github.com/Kaung-Myat-Hun

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago