Skip to content

How do you change height and width of modal? #746

Closed Answered by anmol242
anmol242 asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind, I figured it out on my own. Here is the reference code if it helpful for other folks:

JSX

return (
    <Modal isVisible={isModalVisible} style={styles.modalContainer}>
      <View style={styles.modalContent}>
        {/* do Something */}
      </View>
    </Modal>
  );

CSS:

 modalContainer: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
modalContent: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    display: 'flex',
    fontSize: 16,
    fontWeight: 500,
    backgroundColor: '#ffffff',
    maxHeight: 500,
    width: 400,
    borderRadius: 10,
  },

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anmol242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant