respond-framework
Version:
create as fast you think
52 lines (51 loc) • 1.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = require("react");
var _reactNative = require("react-native");
var _Pressable = require("./Pressable.js");
var _styles = require("../styles.js");
const RadioButton = ({
event,
name,
value,
text,
active,
style,
styleActive,
styleText,
styleTextActive
}) => /*#__PURE__*/React.createElement(_Pressable.default, {
event: event,
arg: {
[name]: value
},
name: name,
disabled: active,
style: [s.c, style, active && s.active, active && styleActive]
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
style: [s.text, styleText, active && styleTextActive]
}, text));
var _default = exports.default = RadioButton;
const s = _reactNative.StyleSheet.create({
c: {
height: 35,
alignItems: 'center',
justifyContent: 'center',
borderWidth: 1,
backgroundColor: _styles.colors.blackLight,
borderColor: _styles.colors.greyLight,
paddingHorizontal: 10
},
active: {
backgroundColor: _styles.colors.grey
},
text: {
fontSize: 14,
lineHeight: 14,
color: _styles.colors.white,
textAlign: 'center'
}
});