Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
topBar: {
visible: true,
noBorder: true, // for iOS
elevation: 0, // for Android
background: {
color: ThemeManager.primaryColor,
},
title: {
color: Colors.white,
fontSize: Typography.text70.fontSize,
fontFamily: Constants.isAndroid ? 'sans-serif-bold' : '.SFUIText-Heavy',
alignment: 'center',
},
subtitle: {
color: Colors.white,
fontSize: Typography.text80.fontSize,
fontFamily: Constants.isAndroid ? Typography.text80.fontFamily : '.SFUIText-Medium',
},
backButton: {
// visible: true,
color: Colors.white,
showTitle: Constants.isIOS ? false : undefined,
testID: 'pop',
},
leftButtonColor: Colors.white,
leftButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
rightButtonColor: Colors.white,
rightButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
},
};
}
visible: true,
noBorder: true, // for iOS
elevation: 0, // for Android
background: {
color: ThemeManager.primaryColor,
},
title: {
color: Colors.white,
fontSize: Typography.text70.fontSize,
fontFamily: Constants.isAndroid ? 'sans-serif-bold' : '.SFUIText-Heavy',
alignment: 'center',
},
subtitle: {
color: Colors.white,
fontSize: Typography.text80.fontSize,
fontFamily: Constants.isAndroid ? Typography.text80.fontFamily : '.SFUIText-Medium',
},
backButton: {
// visible: true,
color: Colors.white,
showTitle: Constants.isIOS ? false : undefined,
testID: 'pop',
},
leftButtonColor: Colors.white,
leftButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
rightButtonColor: Colors.white,
rightButtonDisabledColor: Colors.rgba(Colors.white, 0.6),
},
};
}
export default function styleConstructor(theme = {}) {
const appStyle = {...defaultStyle, ...theme};
return StyleSheet.create({
base: {
width: 32,
height: 32,
alignItems: 'center'
},
text: {
marginTop: 3,
color: appStyle.dayTextColor,
backgroundColor: 'rgba(255, 255, 255, 0)',
...Typography.text80
},
alignedText: {
marginTop: Platform.OS === 'android' ? 4 : 6
},
selected: {
borderRadius: 16,
backgroundColor: Colors.dark10
},
today: {
borderRadius: 16,
borderWidth: 1,
borderColor: appStyle.todayBorderColor
},
todayText: {
color: appStyle.todayTextColor
},
{_.map(examples, (example, i) => (
))}
View,
} from 'react-native-ui-lib';
import BaseInput from './BaseInput';
import TextArea from './TextArea';
const DEFAULT_COLOR_BY_STATE = {
default: Colors.dark40,
focus: Colors.blue30,
error: Colors.red30,
};
const DEFAULT_UNDERLINE_COLOR_BY_STATE = {
default: Colors.dark70,
focus: Colors.blue30,
error: Colors.red30,
};
const LABEL_TYPOGRAPHY = Typography.text80;
export default class TextInput extends BaseInput {
static displayName = 'TextInput';
static propTypes = {
...RNTextInput.propTypes,
...BaseInput.propTypes,
/**
* make component rtl
*/
rtl: PropTypes.bool,
/**
* should placeholder have floating behavior
*/
floatingPlaceholder: PropTypes.bool,
/**
* floating placeholder color as a string or object of states, ex. {default: 'black', error: 'red', focus: 'blue'}
backgroundColor: Colors.dark80
},
rowIcon: {
width: 38,
height: 38,
borderRadius: 19,
backgroundColor: Colors.violet40,
margin: 20
},
rowTitle: {
...Typography.text70,
fontWeight: 'bold',
color: Colors.dark20
},
rowSubtitle: {
...Typography.text80,
color: Colors.dark30
},
rowButtonContainer: {
flex: 1,
alignItems: 'flex-end',
padding: 10
}
});
export default gestureHandlerRootHOC(DrawerScreen);