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 = {
|
|
|
|
|
2021-06-10 12:48:44 +00:00
|
|
|
/**
|
|
|
|
* The id used for the Header-text.
|
|
|
|
*/
|
|
|
|
id?: string,
|
|
|
|
|
2020-03-30 14:17:18 +00:00
|
|
|
/**
|
|
|
|
* 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}
|
|
|
|
*/
|
2021-06-10 12:48:44 +00:00
|
|
|
export default function AudioSettingsHeader({ IconComponent, id, text }: Props) {
|
2020-03-30 14:17:18 +00:00
|
|
|
return (
|
2021-06-10 12:48:44 +00:00
|
|
|
<div
|
|
|
|
className = 'audio-preview-header'
|
|
|
|
role = 'heading'>
|
2020-03-30 14:17:18 +00:00
|
|
|
<div className = 'audio-preview-header-icon'>
|
|
|
|
{ <Icon
|
2021-02-23 11:09:22 +00:00
|
|
|
size = { 20 }
|
2020-03-30 14:17:18 +00:00
|
|
|
src = { IconComponent } />}
|
|
|
|
</div>
|
2021-06-10 12:48:44 +00:00
|
|
|
<div
|
|
|
|
className = 'audio-preview-header-text'
|
|
|
|
id = { id } >{text}</div>
|
2020-03-30 14:17:18 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|