2020-03-30 14:17:18 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
2020-05-20 10:57:03 +00:00
|
|
|
|
2020-03-30 14:17:18 +00:00
|
|
|
import { Icon } from '../../../../base/icons';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The type of the React {@code Component} props of {@link AudioSettingsHeader}.
|
|
|
|
*/
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The Icon used for the Header.
|
|
|
|
*/
|
|
|
|
IconComponent: Function,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The text of the Header.
|
|
|
|
*/
|
|
|
|
text: string,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* React {@code Component} representing the Header of an audio option group.
|
|
|
|
*
|
|
|
|
* @returns { ReactElement}
|
|
|
|
*/
|
|
|
|
export default function AudioSettingsHeader({ IconComponent, text }: Props) {
|
|
|
|
return (
|
|
|
|
<div className = 'audio-preview-header'>
|
|
|
|
<div className = 'audio-preview-header-icon'>
|
|
|
|
{ <Icon
|
|
|
|
size = { 24 }
|
|
|
|
src = { IconComponent } />}
|
|
|
|
</div>
|
|
|
|
<div className = 'audio-preview-header-text'>{text}</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|