import React, {useRef} from 'react'; import {ImageBackground, StyleSheet, Text, View} from 'react-native'; import RNBounceable from '@freakycoder/react-native-bounceable'; import BouncyCheckbox, {BouncyCheckboxHandle} from './build/dist'; const App = () => { const bouncyCheckboxRef = useRef(null); const [checkboxState, setCheckboxState] = React.useState(false); return ( {`Check Status: ${checkboxState.toString()}`} setCheckboxState(!checkboxState)} /> { bouncyCheckboxRef.current?.onCheckboxPress(); }}> Synthetic Checkbox Press ); }; const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'center', }, stateContainer: { height: 45, width: 175, alignItems: 'center', justifyContent: 'center', borderRadius: 12, marginBottom: 12, }, stateTextStyle: { color: '#fff', fontWeight: 'bold', }, syntheticButton: { height: 50, marginTop: 64, borderRadius: 12, width: '60%', alignItems: 'center', justifyContent: 'center', backgroundColor: '#00C0EE', }, iconImageStyle: { width: 20, height: 20, }, textStyle: { color: '#010101', fontWeight: '600', }, }); export default App;