Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Setup global dark theme
global.DARK = {
colors: {
...DarkTheme.colors,
surface: 'black',
text: GREY[50],
primary: tint[500],
accent: tint[300],
}
};
// Setup global light theme
global.LIGHT = {
colors: {
...DefaultTheme.colors,
surface: 'white',
text: GREY[900],
primary: tint[500],
accent: tint[300],
}
};
props.theme.roundness = 32;
props.theme.dark = DARKMODE;
props.theme.colors = DARKMODE ? DARK.colors : LIGHT.colors;
console.log(props.theme);
let first = getFirstLaunch();
if (!first) {
// Update data here if it is not first launch
let dn = new Downloader(getCurrServer());
import { View, FlatList, StyleSheet, Image } from 'react-native';
import { CometChat } from '@cometchat-pro/react-native-chat';
import { users} from './fake_data'
import { TouchableRipple, Text, BottomNavigation } from 'react-native-paper';
import NavigationService from './NavigationService';
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import { Menu,MenuOptions,MenuOption,MenuTrigger } from 'react-native-popup-menu';
import ActionSheet from 'react-native-actionsheet';
const theme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: '#FFF',
}
};
export class HomeScreen extends Component {
static navigationOptions = {
header: null,
}
constructor(props) {
console.log("IN HOME SCREEN.");
super(props);
this.state = {
dataItem: '?',
index: 0,
routes: [
import { DefaultTheme } from "react-native-paper";
import colors from "../Colors";
const theme = {
...DefaultTheme,
dark: false,
roundness: 7,
colors: {
...DefaultTheme.colors,
primary: colors.pineapple,
accent: colors.musturd,
background: colors.issabeline,
text: colors.panegrey,
placeholder: colors.ashgrey,
header: colors.deepkamaru,
headerTitle: colors.white,
//react-native-paper theme colors
surface: colors.white,
primaryText: colors.darkgunmetal
}
};
export default theme;
medium: {
fontFamily: 'Roboto-Bold',
fontWeight: 'normal',
},
thin: {
fontFamily: 'Roboto-Thin',
fontWeight: 'normal',
},
},
};
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: COLORS.primary,
accent: COLORS.accent,
},
fonts: configureFonts(fontConfig),
};
import {AppContainer} from 'src/navigation';
export default class Entrypoint extends React.Component {
render() {
return (
);
}
...DarkTheme.colors,
background: '#2e3436',
primary: '#555753',
accent: '#e9b96e',
accent_alt: '#547f2f',
text: '#d3d7cf',
comment: '#272c2d',
}
};
const whiteTheme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
background: '#ffffff',
primary: '#30579a',
accent: '#30579a',
accent_alt: '#547f2f',
text: '#070707',
comment: '#ececec',
}
};
class LOReader extends Component {
state = {
theme: darkTheme
};
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/es/integration/react';
import NavigationStack from 'src/navigation';
import configureStore from 'src/store/configureStore';
const { persistor, store } = configureStore();
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
const theme = {
...DefaultTheme,
roundness: 2,
colors: {
...DefaultTheme.colors,
primary: '#0084ff',
accent: '#f1c40f',
background: '#f9f9f9',
paper: 'white'
}
};
export default class Entrypoint extends Component {
render() {
return (
import { DefaultTheme } from 'react-native-paper';
export default {
...DefaultTheme,
roundness: 5,
colors: {
...DefaultTheme.colors,
primary: '#4A90E2',
accent: '#1C4442',
},
fonts: {
thin: 'product-regular',
light: 'product-regular',
regular: 'product-regular',
medium: 'product-medium',
bold: 'product-bold',
italic: 'product-italic',
},
};
import {DefaultTheme} from 'react-native-paper';
import colors from '../Colors';
const theme = {
...DefaultTheme,
dark: false,
roundness: 7,
colors: {
...DefaultTheme.colors,
primary: colors.tiffanyBlue,
accent: colors.flame,
background: colors.issabeline,
text: colors.panegrey,
placeholder: colors.ashgrey,
header: colors.deepkamaru,
headerTitle: colors.white,
//react-native-paper theme colors
surface: colors.white,
primaryText: colors.darkgunmetal,
},
};
export default theme;
render() {
return (
);
}
}