1 line
1.8 KiB
Plaintext
1 line
1.8 KiB
Plaintext
{"version":3,"file":"main.4219b8cb7d58862b56fa.bundle.js","sources":["webpack:///./src/components/Button.jsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport {\n ViewPropTypes,\n StyleSheet,\n Text,\n TouchableHighlight,\n} from 'react-native'\n\n// Theme\nimport theme from '../theme'\n\nconst { colors } = theme\n\nconst styles = StyleSheet.create({\n touchable: {\n backgroundColor: colors.main.white.rgb,\n borderRadius: 8,\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignItems: 'center',\n },\n touchableMain: {\n backgroundColor: colors.main.accentBlue.rgb,\n },\n touchableDisabled: {\n backgroundColor: colors.main.lightGrey.rgb,\n },\n text: {\n marginHorizontal: 32,\n marginVertical: 11,\n color: colors.main.accentBlue.rgb,\n textAlign: 'center',\n fontSize: 15,\n },\n textMain: {\n color: colors.main.white.rgb,\n },\n textDisabled: {\n color: colors.main.darkGrey.rgb,\n },\n})\n\nclass Button extends React.Component {\n render() {\n const { main, title, disabled, onPress, accessibilityLabel } = this.props\n\n return (\n <TouchableHighlight\n style={[\n styles.touchable,\n main && styles.touchableMain,\n disabled && styles.touchableDisabled,\n ]}\n disabled={disabled}\n onPress={onPress}\n accessibilityLabel={accessibilityLabel}\n >\n <Text style={[styles.text, main && styles.textMain, disabled && styles.textDisabled]}>\n {title}\n </Text>\n </TouchableHighlight>\n )\n }\n}\n\nButton.propTypes = {\n accessibilityLabel: PropTypes.func,\n disabled: PropTypes.bool,\n main: PropTypes.bool,\n onPress: PropTypes.func,\n title: PropTypes.string,\n}\n\nexport default Button\n"],"mappings":"AAYA","sourceRoot":""} |