react-terminal icon indicating copy to clipboard operation
react-terminal copied to clipboard

Run commands upon button press

Open BjornTheProgrammer opened this issue 2 years ago • 0 comments

Is it possible to run commands via button press?

For example

import React from "react";

function CommandButton() {
	return (
		<button 
			onClick={() => ReactTerminal.cd("home")}
		>
			Run Command
		</button>
	);
}

export default CommandButton;

BjornTheProgrammer avatar Aug 18 '22 00:08 BjornTheProgrammer