Giter Site home page Giter Site logo

Comments (5)

jeremybarbet avatar jeremybarbet commented on August 22, 2024 1

I rewrote examples to make it easier to understand: https://jeremybarbet.github.io/react-native-modalize/#/EXAMPLES and I'll improve them in the future to show this behavior :)

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on August 22, 2024

Hi hi!

Thanks for using modalize.

Do you have a code to share to see how you declared modalize and where do you have the blue header also on top of the overlay

from react-native-modalize.

kresogalic8 avatar kresogalic8 commented on August 22, 2024

Hey, yes, here's the code

import { View, TouchableOpacity, TextInput, Image } from 'react-native'
import { MaterialCommunityIcons, FontAwesome } from "@expo/vector-icons"
import Modal from "react-native-modal";
import { COLORS } from '../../common/Colors';
import Text from "../../components/CustomText/"
import Button from "../../components/Button/"
import styles from "./style";
import * as firebase from "firebase";
import 'firebase/functions'
import Modalize from 'react-native-modalize';

export default class Personality extends Component {
    state = {
        visible: false,
        visibleReviewModal: false,
        visibleText: false,
        selectedGrade: null,
        comment: '',
        grade: 0,
        isLoading: false
    }

    modal = React.createRef();

    onOpen = () => {
        if (this.modal.current) {
          this.modal.current.open();
        }
    }

    _toggleModal = () => this.setState({ visible: !this.state.visible });

    _toggleReviewModal = () => this.setState({ visibleReviewModal: !this.state.visibleReviewModal });

    _toggleReview = grade => {
        this.setState({ visibleText: true, grade, selectedGrade: grade });
    }

    _sendReview = async () => {
        this.setState({ isLoading: true })
        const httpsCallable = firebase.app().functions('europe-west1').httpsCallable('giveFeedback');

        try {
            const { data } = await httpsCallable({
                grade: this.state.selectedGrade,
                characteristic: this.props.data.enum,
                comment: this.state.comment,
                to: this.props.selectedUser.userId,
                date: new Date().toISOString()
            });
            if(data.success) this.setState({ isLoading: false, visibleReviewModal: false })
        } catch (error) {
            console.log(error, "----- erro")
        }
    }

    render() {
        return (
            <>
                <View style={styles.personality}>
                    <TouchableOpacity
                        onPress={() => this.onOpen()}
                        style={{ alignItems: 'center' }}
                    >
                        <MaterialCommunityIcons name="information" size={25} color={COLORS.primary} />
                    </TouchableOpacity>

                    <TouchableOpacity onPress={this._toggleReviewModal} style={styles.personalityBtn}>
                        <View style={{ flex: 1 }}>
                            <Text style={styles.personalityTitle}>{this.props.data.name}</Text>
                            <View style={styles.personalityContainer}>
                                <Text numberOfLines={1} style={styles.personalityText}>{this.props.data.description}</Text>
                            </View>
                        </View>
                        <View style={{ backgroundColor: COLORS.green, width: 30, height: 30, borderRadius: 15, alignItems: 'center', justifyContent: 'center' }}>
                            <MaterialCommunityIcons name="chevron-right" size={25} color="#3b9b92" />
                        </View>
                    </TouchableOpacity>
                </View>

                <Modalize ref={this.modal} adjustToContentHeight>
                    <Text>...your content</Text>
                </Modalize>
            </>
        )
    }
}```

from react-native-modalize.

kresogalic8 avatar kresogalic8 commented on August 22, 2024

I believe the main problem is react navigation header, he's visible always in every case. This is the screen in stack.

from react-native-modalize.

jeremybarbet avatar jeremybarbet commented on August 22, 2024

Alright, two things:

from react-native-modalize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.