1.0.6 • Published 6 months ago

react-bate-terminal v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago