Skip to content

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

@mealbarracin10

Description

@mealbarracin10

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions