Git Product home page Git Product logo

react-native-customisable-alert's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-customisable-alert's Issues

Cant change btnStyle

I need to create a window with a one call place, so custom alerts don't work for me.
I tried to implement the window call using this method:

export async function openModal(title: string, text: string, cancelText: string, continueText: string): Promise<boolean> {
    return new Promise((resolve) => {
        showAlert({
            customIcon: 'none',
            dismissable: true,
            title: title,
            message: text,
            leftBtnLabel: cancelText,
            btnLabel: continueText,
            alertType: 'warning',
            onPress: () => {
                closeAlert();
                resolve(true);
            },
            onDismiss: () => {
                closeAlert();
                resolve(false);
            },
        })
    });
}

And I'm using CustomizableAlert with modified styles, but I can't change buttons style in any way.

            <CustomisableAlert
                titleStyle={{
                    fontSize: 18,
                    fontWeight: 'bold',
                    color: 'white',
                    textAlign: 'left',
                }}
                textStyle={{
                    color: 'white',
                    textAlign: 'left',
                    paddingTop: 16,
                }}
                alertContainerStyle={{
                    backgroundColor: '#2B2930',
                    padding: 24,
                    borderRadius: 28,
                }}
                btnLabelStyle={{
                    color: 'white',
                }}
                btnStyle={{
                    style: {
                        backgroundColor: 'transparent',
                        margin: 0,
                        padding: 0,
                    }
                }}
            />```

How to show alert on Modal ?

Use case : In a component screen we have multiple modals implemented these have forms ,we tried to "showAlert" but is hiding behind the other modals.

Remove title

how can i remove tittle from alert
like this but it display "Title"
///
showAlert({
visible: true,
title: '',
message: translate('customAlert.lbl_are_you_sure'),
alertType: 'warning',
onPress: () => {
BackHandler.exitApp(), setAlertVisible(false);
closeAlert();
},
onDismiss: () => {
closeAlert();
setAlertVisible(false);
},
btnLabel: translate('customAlert.btn_Exit'),
leftBtnLabel: translate('customAlert.btn_Dismiss'),
});

After exiting the alert, render again

After exiting the alert, the alert is displayed again for a short while, possibly the App.jsx is rendered alert again for a short time. Is there a way to solve this problem?

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.