Skip to content

Commit

Permalink
appointment button linked to form section
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushi25sep committed Apr 6, 2021
1 parent 1356d3e commit 1b8a34a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/screens/HospitalForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export class HospitalForm extends Component {
buttonDisabled: true,
};
}
buttonClicked = () => {
const anchor = document.getElementById("appointment-button");
anchor.scrollIntoView({ behavior: "smooth", block: "center" });
};

render() {
const names = ["Dr.Ashish Sharma", "Dr.Anita Pateshwari"];
const description = ["MBBS, DFM ,CCH", "MBBS"];
Expand Down Expand Up @@ -89,6 +94,7 @@ export class HospitalForm extends Component {
<Row>
<Button
className="hospital-button"

type="primary"
size="large"
style={{
Expand All @@ -99,8 +105,11 @@ export class HospitalForm extends Component {
height: "50px",
fontWeight:"500",
}}

>
<a onClick={this.buttonClicked}>
Make an Appointment
</a>
</Button>
</Row>
</Col>
Expand Down Expand Up @@ -128,7 +137,7 @@ export class HospitalForm extends Component {
Schedule your appointment with Doctor!
</h1>
<Row>
<div className="hospital-form">
<div className="hospital-form" id="appointment-button">
<Form layout="vertical" style={{ width: "100%" }}>
<Form.Item
name="date"
Expand Down

0 comments on commit 1b8a34a

Please sign in to comment.