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

functions.native.js 553B

123456789101112131415161718192021222324
  1. // @flow
  2. import { DefaultTheme } from 'react-native-paper';
  3. import { createColorTokens } from './utils';
  4. /**
  5. * Creates a React Native Paper theme based on local UI tokens.
  6. *
  7. * @param {Object} arg - The ui tokens.
  8. * @returns {Object}
  9. */
  10. export function createNativeTheme({ font, colors, colorMap, shape, spacing, typography }: Object) {
  11. return {
  12. ...DefaultTheme,
  13. palette: createColorTokens(colorMap, colors),
  14. shape,
  15. spacing,
  16. typography: {
  17. font,
  18. ...typography
  19. }
  20. };
  21. }