[React] Toggle Button 구현하기
; 리액트에서 토글버튼 구현하기 1. CustomSwitch.js : 토글버튼을 디자인할 js를 생성한다. import React, { useState } from 'react'; import { StyleSheet, Text, View, TouchableOpacity } from 'react-native' const CustomSwitch = ({ navigation, selectionMode, roundCorner, option1, //토글버튼에 쓰여질 text1 option2, //토글버튼에 쓰여질 text2 onSelectSwitch, selectionColor }) => { const [getSelectionMode, setSelectionMode] = useState(selectionMode)..
2022. 1. 29.