UNPKG

@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.

41 lines 1.05 kB
import React from 'react'; import { Switch, View, Text, StyleSheet } from 'react-native'; import { COLORS } from '../utils/theme'; export const SwitchRow = ({ text, LeftIcon, containerStyle, textStyle, value, onChange }) => { return /*#__PURE__*/React.createElement(View, { style: [styles.container, containerStyle] }, /*#__PURE__*/React.createElement(View, { style: styles.container }, LeftIcon, /*#__PURE__*/React.createElement(Text, { style: [styles.text, textStyle] }, text)), /*#__PURE__*/React.createElement(Switch, { value: value, thumbColor: COLORS.WHITE, trackColor: { true: COLORS.PRIMARY.DEFAULT, false: COLORS.SECONDARY.DISABLED }, onValueChange: onChange })); }; const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }, text: { fontFamily: 'Inter-Medium', fontSize: 16, lineHeight: 24, color: COLORS.TEXT.HIGH_EMPHASIS } }); //# sourceMappingURL=SwitchRow.js.map