diff --git a/README.md b/README.md index 8447269..2adb43a 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,13 @@ you can also handle the result with a callback ### Minimise, maximise and close the window +```jsx + +``` +

@@ -418,6 +425,8 @@ Use | **description** | object | {} | | **commands** | object | { clear, help, show, } | | **msg** | string | - | +| **closedTitle** | string | OOPS! You closed the window. | +| **closedMessage** | string | Click on the icon to reopen. | | **watchConsoleLogging** | bool | false | | **commandPassThrough** | function | null | | **promptSymbol** | string | > | diff --git a/src/js/components/Terminal/index.js b/src/js/components/Terminal/index.js index 462b680..33393d2 100644 --- a/src/js/components/Terminal/index.js +++ b/src/js/components/Terminal/index.js @@ -268,7 +268,9 @@ class Terminal extends Component { // Show msg (on window close) getNote = () => ( -

OOPS! You closed the window.

+

+ {this.props.closedTitle} +

- Click on the icon to reopen. + {this.props.closedMessage}
); diff --git a/src/js/components/types.js b/src/js/components/types.js index a225310..8f5efec 100644 --- a/src/js/components/types.js +++ b/src/js/components/types.js @@ -23,6 +23,8 @@ export const TerminalPropTypes = { hideTopBar: PropTypes.bool, allowTabs: PropTypes.bool, msg: PropTypes.string, + closedTitle: PropTypes.string, + closedMessage: PropTypes.string, color: PropTypes.string, style: PropTypes.object, // eslint-disable-line prompt: PropTypes.string, @@ -79,6 +81,8 @@ export const TerminalDefaultProps = { allowTabs: true, showActions: true, msg: '', + closedTitle: 'OOPS! You closed the window.', + closedMessage: 'Click on the icon to reopen.', color: 'green', style: {}, prompt: 'green',