Skip to content

Instantly share code, notes, and snippets.

@mohanramphp
Created May 24, 2020 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohanramphp/198c4ed19596737f4e7a5959f2c9c50c to your computer and use it in GitHub Desktop.
Save mohanramphp/198c4ed19596737f4e7a5959f2c9c50c to your computer and use it in GitHub Desktop.
React Register Component holding static template for user registration
import React from "react";
import styles from "./Register.module.css";
import { Link } from "react-router-dom";
const Register = () => (
<div
className={`${styles.container} container-fluid d-flex align-items-center justify-content-center`}
>
<div className={styles.registrationFormContainer}>
<fieldset className="border p-3 rounded">
<legend
className={`${styles.registrationFormLegend} border rounded p-1 text-center`}
>
Registration Form
</legend>
<form>
<div className="form-group">
<label htmlFor="inputForEmail">Email address</label>
<span className="mandatory">*</span>
<input
id="inputForEmail"
type="email"
className="form-control"
aria-describedby="Enter email address"
placeholder="Enter email address"
/>
</div>
<div className="form-group">
<label htmlFor="inputForName">Your Name</label>
<span className="mandatory">*</span>
<input
id="inputForName"
type="text"
className="form-control"
aria-describedby="Enter your name"
placeholder="Enter your name"
/>
</div>
<div className="form-group">
<label htmlFor="inputForPassword">Password</label>
<span className="mandatory">*</span>
<input
type="password"
className="form-control"
id="inputForPassword"
placeholder="Enter password"
/>
</div>
<div className="d-flex align-items-center justify-content-center">
<button type="submit" className="btn btn-outline-primary">
Submit
</button>
<button className="btn btn-link">
<Link to="/login">Cancel</Link>
</button>
</div>
</form>
</fieldset>
</div>
</div>
);
export default Register;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment