Turn TranscribingLabel a self-containing component

This commit is contained in:
Bettenbuk Zoltan
2018-09-12 17:10:12 +02:00
committed by Saúl Ibarra Corretgé
parent dc90800e50
commit d604cdfe27
4 changed files with 38 additions and 18 deletions

View File

@@ -5,8 +5,29 @@
*/
export type Props = {
/**
* True if the label needs to be rendered, false otherwise.
*/
_showLabel: boolean,
/**
* Invoked to obtain translated strings.
*/
t: Function
};
/**
* Maps (parts of) the redux state to the associated props of the
* {@link AbstractTranscribingLabel} {@code Component}.
*
* @param {Object} state - The redux state.
* @private
* @returns {{
* _showLabel: boolean
* }}
*/
export function _mapStateToProps(state: Object) {
return {
_showLabel: state['features/transcribing'].isTranscribing
};
}