File "AddButton.js"

Full path: /home/satkhirabarta/public_html/wp-content/plugins/really-simple-ssl/settings/src/Settings/DynamicDataTable/AddButton.js
File size: 825 B (825 B bytes)
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

const AddButton = ({ getCurrentFilter, moduleName, handleOpen, processing, blockedText, allowedText }) => {
    let buttonText = getCurrentFilter(moduleName) === 'blocked' ?  blockedText : allowedText;

    return (
        <div className="rsssl-add-button">
            {(getCurrentFilter(moduleName) === 'blocked' || getCurrentFilter(moduleName) === 'allowed') && (
                <div className="rsssl-add-button__inner">
                    <button
                        className="button button-secondary button-datatable rsssl-add-button__button"
                        onClick={handleOpen}
                        disabled={processing}
                    >
                        {buttonText}
                    </button>
                </div>
            )}
        </div>
    );
};

export default AddButton;