jonmbake / react-terminal-ui

A terminal react component with support for light and dark modes.
https://jonmbake.github.io/react-terminal-ui/demo/
MIT License
205 stars 30 forks source link

Click callback for window buttons #25

Closed Alvinn8 closed 1 year ago

Alvinn8 commented 2 years ago

Is your feature request related to a problem? Please describe. There is no way to add click listeners to the macOS-style buttons on the terminal window.

Describe the solution you'd like A way to pass a callback for when the buttons are pressed to the Terminal component.

Describe alternatives you've considered Fork the project and add the listeners.

Additional context An example use case is closing, minimizing and maximizing the terminal window when the buttons are passed.

github-actions[bot] commented 2 years ago

Thank you for taking the time to submit an Issue! You should get a response to this issue within one to two days.

nfacha commented 2 years ago

+1 For this

jonmbake commented 2 years ago

This should be relatively easy to implement. The buttons are currently rendered as a CSS pseudo element. We'd have to change them to something like a HTML button element instead and add onClicks.