GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
271 stars 105 forks source link

No buttons or styling #49

Closed z-sanjivini closed 3 years ago

z-sanjivini commented 4 years ago

`import { confirmAlert } from 'react-confirm-alert'; // Import import 'react-confirm-alert/src/react-confirm-alert.css'

/* Importing custom Components /

import { setCurrentResponse, removeResponse } from "../../../store/actions/rules/rulesActions";

/* Importing custom Styles / import classes from './RulesResponses.module.css'; import PlayIcon from '../../UI/PlayIcon/PlayIcon'; import AlertModal from '../../UI/AlertModal/AlertModal';

/* Main Components / const RulesResponses = ({ propsRedux, propsOwned, setCurrentResponse, removeResponse }) => {

var responsesArr = propsOwned.responsesArr;
var isAddResponseVisible = propsOwned.isAddResponseVisible;
const title= "Title";

const options = {
    title: title,
    message: 'Message',
    buttons: [
      {
        label: 'Yes',
        onClick: () => alert('Click Yes')
      },
      {
        label: 'No',
        onClick: () => alert('Click No')
      }
    ],
    childrenElement: () => <div />,
    customUI: ({ onClose }) => <div>Custom UI</div>,
    closeOnEscape: true,
    closeOnClickOutside: true,
    willUnmount: () => {},
    afterClose: () => {},
    onClickOutside: () => {},
    onKeypressEscape: () => {}
  };

const _onRemoveClick = (index=0) => {
    confirmAlert(options);
    removeResponse(propsOwned.dataRulekey, propsOwned.evalKey, propsOwned.responseKey, propsOwned.iterationKey, index);
}`
z-sanjivini commented 4 years ago

I do not see any buttons or any styles when I simply try the code given in for demo. I see an overlay with just custom UI written in the centre

Johnne25 commented 3 years ago

I had the same issue. No style applied using the code provided in the samples.

GA-MO commented 3 years ago

@z-sanjivini @Johnne25 Remove customUI: ({ onClose }) => <div>Custom UI</div> out of the options for simple test.