You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AudioSettingsHeader.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // @flow
  2. import React from 'react';
  3. import { Icon } from '../../../../base/icons';
  4. /**
  5. * The type of the React {@code Component} props of {@link AudioSettingsHeader}.
  6. */
  7. type Props = {
  8. /**
  9. * The id used for the Header-text.
  10. */
  11. id?: string,
  12. /**
  13. * The Icon used for the Header.
  14. */
  15. IconComponent: Function,
  16. /**
  17. * The text of the Header.
  18. */
  19. text: string,
  20. };
  21. /**
  22. * React {@code Component} representing the Header of an audio option group.
  23. *
  24. * @returns { ReactElement}
  25. */
  26. export default function AudioSettingsHeader({ IconComponent, id, text }: Props) {
  27. return (
  28. <div
  29. className = 'audio-preview-header'
  30. role = 'heading'>
  31. <div className = 'audio-preview-header-icon'>
  32. { <Icon
  33. size = { 20 }
  34. src = { IconComponent } />}
  35. </div>
  36. <div
  37. className = 'audio-preview-header-text'
  38. id = { id } >{text}</div>
  39. </div>
  40. );
  41. }