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.

functions.native.ts 545B

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