2020-03-30 14:17:18 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Click handler for the button.
|
|
|
|
*/
|
|
|
|
onClick: Function,
|
2021-06-10 12:48:44 +00:00
|
|
|
|
|
|
|
/**
|
2021-11-04 21:10:43 +00:00
|
|
|
* Keypress handler for the button.
|
2021-06-10 12:48:44 +00:00
|
|
|
*/
|
|
|
|
onKeyPress: Function,
|
2020-03-30 14:17:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* React {@code Component} representing an button used for testing output sound.
|
|
|
|
*
|
|
|
|
* @returns { ReactElement}
|
|
|
|
*/
|
2021-06-10 12:48:44 +00:00
|
|
|
export default function TestButton({ onClick, onKeyPress }: Props) {
|
2020-03-30 14:17:18 +00:00
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className = 'audio-preview-test-button'
|
2021-06-10 12:48:44 +00:00
|
|
|
onClick = { onClick }
|
|
|
|
onKeyPress = { onKeyPress }
|
|
|
|
role = 'button'
|
|
|
|
tabIndex = { 0 }>
|
2020-03-30 14:17:18 +00:00
|
|
|
Test
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|