@100mslive/react-native-room-kit
Version:
100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.
49 lines • 1.33 kB
JavaScript
import React from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { RadioInput } from './RadioInput';
import { useHMSRoomStyleSheet } from '../hooks-util';
export const RadioInputRow = ({
text,
containerStyle,
selected,
disabled,
textStyle,
radioSize,
radioColor,
onChange
}) => {
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
surfaceHighRegularText: {
color: theme.palette.on_surface_high,
fontFamily: `${typography.font_family}-Regular`
}
}));
return /*#__PURE__*/React.createElement(TouchableOpacity, {
disabled: disabled,
style: [styles.container, containerStyle],
onPress: () => onChange(!selected)
}, /*#__PURE__*/React.createElement(View, {
style: styles.radioWrapper
}, /*#__PURE__*/React.createElement(RadioInput, {
selected: selected,
color: radioColor,
size: radioSize
})), /*#__PURE__*/React.createElement(Text, {
style: [styles.normalText, hmsRoomStyles.surfaceHighRegularText, textStyle]
}, text));
};
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center'
},
radioWrapper: {
padding: 8,
marginRight: 8
},
normalText: {
fontSize: 16,
lineHeight: 24
}
});
//# sourceMappingURL=RadioInputRow.js.map