您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

TabIcon.js 675B

123456789101112131415161718192021222324252627282930313233343536
  1. // @flow
  2. import React from 'react';
  3. import { Icon } from '../../base/icons';
  4. import BaseTheme from '../../base/ui/components/BaseTheme';
  5. import { INACTIVE_TAB_COLOR } from '../constants';
  6. type Props = {
  7. /**
  8. * Is the tab focused?
  9. */
  10. focused?: boolean,
  11. /**
  12. * The ImageSource to be rendered as image.
  13. */
  14. src: Object,
  15. /**
  16. * The component's external style.
  17. */
  18. style?: Object
  19. }
  20. const TabIcon = ({ focused, src, style }: Props) => (
  21. <Icon
  22. color = { focused ? BaseTheme.palette.icon01 : INACTIVE_TAB_COLOR }
  23. size = { 24 }
  24. src = { src }
  25. style = { style } />
  26. );
  27. export default TabIcon;