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

TabIcon.tsx 749B

1234567891011121314151617181920212223242526272829303132333435
  1. import React from 'react';
  2. import Icon from '../../base/icons/components/Icon';
  3. import { StyleType } from '../../base/styles/functions.any';
  4. import BaseTheme from '../../base/ui/components/BaseTheme';
  5. import { INACTIVE_TAB_COLOR } from '../constants';
  6. interface IProps {
  7. /**
  8. * Is the tab focused?
  9. */
  10. focused?: boolean;
  11. /**
  12. * The ImageSource to be rendered as image.
  13. */
  14. src: Function;
  15. /**
  16. * The component's external style.
  17. */
  18. style?: StyleType;
  19. }
  20. const TabIcon = ({ focused, src, style }: IProps) => (
  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;