Modal Frame -> 모달 틀

2022. 3. 15. 10:22React-Native/초기 셋팅에 필요한 코드

import React, {Children, useState} from 'react';
import {View, Modal, StyleSheet} from 'react-native';

const ModalFrame = ({visible, onPress}) => {
  return (
    <Modal visible={visible} transparent>
      <View
        style={{
          flex: 1,
          backgroundColor: 'rgba(0,0,0,0.5)',
          justifyContent: 'center',
          alignItems: 'center',
        }}>
        <View
          style={{
            display: 'flex',
            flexDirection: 'row',
            marginHorizontal: 9.5,
            backgroundColor: 'white',
            borderRadius: 10,
            borderColor: '#fff',
            borderWidth: 1,
            height: 155,
          }}>
          <View style={styles.centerArray}></View>
        </View>
      </View>
    </Modal>
  );
};

export default ModalFrame;

const styles = StyleSheet.create({
  centerArray: {
    flex: 1,
  },
});