sweetalert-react icon indicating copy to clipboard operation
sweetalert-react copied to clipboard

input doesn't working in render html for popup body?

Open mealbarracin10 opened this issue 7 years ago • 1 comments

i try set a popup with 2 fields, i am try as a component but it just show the labels, and doesn't show the fields

class App extends Component {
      constructor(props) {
        super(props);
        this.state = {
          show: false,
        };
      }
      render() {
        return (
          <div className="App">
          <SweetAlert
              show='true'
              title="Demo"
              html
              text={renderToStaticMarkup(<HelloWorld />)}
              onConfirm={() => this.setState({ show: false })}
            />
          </div>
        );
      }
    }

and it is my component HelloWorld,

 import React from 'react';
const HelloWorld = () =>
 <div>
     <div class="form-group">
         <label for="exampleInputEmail1">Email address</label>
         <input type="email" class="form-control" id="exampleInputEmail1" aria- describedby="emailHelp" placeholder="Enter email" />
     </div>
     <div class="form-group">
         <label for="exampleInputPassword1">Password</label>
         <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" />
     </div>
 </div>

export default HelloWorld;

mealbarracin10 avatar Jun 15 '18 16:06 mealbarracin10

@mealbarracin10 Any solution related to this ?

mayank0109 avatar Jun 22 '20 13:06 mayank0109