@speechly/react-ui
Advanced tools
Comparing version 2.0.0-beta.8 to 2.0.0-beta.9
@@ -40,3 +40,3 @@ "use strict"; | ||
react_1.useEffect(function () { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined) { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined && speechState !== undefined) { | ||
refElement.current.speechstate(types_1.mapSpeechStateToClientState(speechState)); | ||
@@ -46,3 +46,3 @@ } | ||
react_1.useEffect(function () { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined) { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined && segment !== undefined) { | ||
refElement.current.speechsegment(segment); | ||
@@ -49,0 +49,0 @@ } |
@@ -18,5 +18,5 @@ import React from 'react'; | ||
/** | ||
* Optional hint text | ||
* Optional hint text or array | ||
*/ | ||
hint?: string; | ||
hint?: string | string[]; | ||
/** | ||
@@ -30,2 +30,6 @@ * Optional minimum height as CSS string. Default: "8rem" | ||
smallTextColor?: string; | ||
/** | ||
* Optional CSS string for hint text size. Default: "0.9rem" | ||
*/ | ||
hintFontSize?: string; | ||
}; | ||
@@ -32,0 +36,0 @@ /** |
@@ -43,9 +43,9 @@ "use strict"; | ||
react_1.useEffect(function () { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined) { | ||
if ((refElement === null || refElement === void 0 ? void 0 : refElement.current) !== undefined && segment !== undefined) { | ||
refElement.current.speechsegment(segment); | ||
} | ||
}, [segment]); | ||
return (react_1.default.createElement("transcript-drawer", { ref: refElement, formattext: props.formatText === false ? 'false' : 'true', fontsize: props.fontSize, color: props.color, smalltextcolor: props.smallTextColor, highlightcolor: props.highlightColor, backgroundcolor: props.backgroundColor, marginbottom: props.marginBottom, hint: props.hint, height: props.height })); | ||
return (react_1.default.createElement("transcript-drawer", { ref: refElement, formattext: props.formatText === false ? 'false' : 'true', fontsize: props.fontSize, color: props.color, smalltextcolor: props.smallTextColor, highlightcolor: props.highlightColor, backgroundcolor: props.backgroundColor, marginbottom: props.marginBottom, hint: JSON.stringify(props.hint), height: props.height, hintfontsize: props.hintFontSize })); | ||
}; | ||
exports.TranscriptDrawer = TranscriptDrawer; | ||
//# sourceMappingURL=TranscriptDrawer.js.map |
{ | ||
"name": "@speechly/react-ui", | ||
"private": false, | ||
"version": "2.0.0-beta.8", | ||
"version": "2.0.0-beta.9", | ||
"description": "Speechly UI Components", | ||
@@ -57,3 +57,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@speechly/browser-ui": "^1.3.10", | ||
"@speechly/browser-ui": "^1.3.12", | ||
"pubsub-js": "^1.9.2", | ||
@@ -60,0 +60,0 @@ "react-spring": "^8.0.27", |
@@ -206,3 +206,3 @@ <h1 align="center"> | ||
<ul> | ||
<li><code>hint</code> - Hint text | ||
<li><code>hint</code> - Hint text to be shown when the app is listening for speech. Hint is hidden upon user speech is received. String or a string[]. If an array is provided, the next tip is automatically shown after an utterance. After all tips are shown, they will be shown again in random order. Default: "" | ||
<li><code>height</code> - Optional minimum height as CSS string. Default: "8rem"</li> | ||
@@ -209,0 +209,0 @@ <li><code>color</code> - Optional string (CSS color) for text. Default: "#ffffff" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86521
1051
Updated@speechly/browser-ui@^1.3.12