How to use the ink.Text function in ink

To help you get started, we’ve selected a few ink examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github burgerbuds / swiff / dist / templates.js View on Github external
}, !(0, _utils.isEmpty)(messages) && messages.map(({
  text,
  type
}, i) => _react.default.createElement(_ink.Box, {
  key: `msg${i}`
}, type === 'heading' && !isFlaggedStart && _react.default.createElement(_ink.Box, {
  marginBottom: 1
}, _react.default.createElement(_ink.Text, {
  bold: true
}, `—— ${text} ——`)), type === 'heading' && isFlaggedStart && _react.default.createElement(_ink.Text, {
  bold: true
}, `${text}\n`), _react.default.createElement(_ink.Color, {
  dim: messages.length - 1 !== i
}, type === 'error' && `💩  ${text}`, type === 'success' && `👌  ${text}`, type === 'message' && `💁‍  ${text}`, type === 'working' && (messages.length - 1 === i ? _react.default.createElement(_inkSpinner.default, {
  type: "runner"
}) : `🏃 `), type === 'working' && ` ${text}`))));
github MihaiVoinea / makerlog-cli / build / commands / login.js View on Github external
render() {
    return _react.default.createElement(_ink.Text, null, this.state.message || _react.default.createElement(_loader.default, null));
  }
github MihaiVoinea / makerlog-cli / build / commands / done.js View on Github external
render() {
    return _react.default.createElement(_ink.Text, null, this.state.message || _react.default.createElement(_loader.default, null));
  }
github MihaiVoinea / makerlog-cli / build / commands / logout.js View on Github external
render() {
    return _react.default.createElement(_ink.Text, null, "Logged you out.");
  }
github MihaiVoinea / makerlog-cli / build / commands / todo.js View on Github external
render() {
    return _react.default.createElement(_ink.Text, null, this.state.message || _react.default.createElement(_loader.default, null));
  }
github burgerbuds / swiff / dist / templates.js View on Github external
}, !(0, _utils.isEmpty)(messages) && messages.map(({
  text,
  type
}, i) => _react.default.createElement(_ink.Box, {
  key: `msg${i}`
}, type === 'heading' && !isFlaggedStart && _react.default.createElement(_ink.Box, {
  marginBottom: 1
}, _react.default.createElement(_ink.Text, {
  bold: true
}, `—— ${text} ——`)), type === 'heading' && isFlaggedStart && _react.default.createElement(_ink.Text, {
  bold: true
}, `${text}\n`), _react.default.createElement(_ink.Color, {
  dim: messages.length - 1 !== i
}, type === 'error' && `💩  ${text}`, type === 'success' && `👌  ${text}`, type === 'message' && `💁‍  ${text}`, type === 'working' && (messages.length - 1 === i ? _react.default.createElement(_inkSpinner.default, {
  type: "runner"
}) : `🏃 `), type === 'working' && ` ${text}`))));

ink

React for CLI

MIT
Latest version published 5 months ago

Package Health Score

93 / 100
Full package analysis