forked from aishwaryaramachandran/final_locals
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
77 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,63 @@ | ||
import React, { Component } from 'react'; | ||
|
||
class TimeSet extends Component { | ||
constructor(props) { | ||
super(props) | ||
this.state = { | ||
startTime: 9 | ||
}; | ||
} | ||
render() { | ||
const timeArray = this.props.time; | ||
console.log('time in timeset is', parseInt(this.props.time)) | ||
const cardArray = this.props.card | ||
console.log(cardArray) | ||
return ( | ||
<div className="has-text-centered"> | ||
{ | ||
timeArray.map((time) => { | ||
return <div className="time" > | ||
<h6 className="title is-6">{`${time} : 00`}</h6> | ||
</div>; | ||
}) | ||
} | ||
<div className="time-input"> | ||
<input className="input" type="number" placeholder="9" onKeyDown={(event) => { | ||
if (event.key === 'Enter') { | ||
console.log('new time!!!!!', event.target.value) | ||
} | ||
}} /> | ||
<div className="select is-multiple"onClick={(event) => { | ||
if (event.key === 'Enter') { | ||
console.log('new time!!!!!', event.target.value) | ||
} | ||
}}> | ||
<select multiple size="2"> | ||
<option value="AM" onClick={(event) => { | ||
if (event.key === 'Enter') { | ||
console.log('new time!!!!!', event.target.value) | ||
} | ||
}}>AM</option> | ||
<option value="PM" onClick={(event) => { | ||
if (event.key === 'Enter') { | ||
console.log('new time!!!!!', event.target.value) | ||
} | ||
}}>PM</option> | ||
</select> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default TimeSet; | ||
|
||
// Logic for rendering times based on start time and duration of card | ||
// <div className="has-text-centered"> | ||
// { | ||
// timeArray.map((time) => { | ||
// if(time === 9){ | ||
// return <div className="time"> | ||
// <h6 className="title is-6">{`${time} : 00`}</h6> | ||
// </div>; | ||
// } else { | ||
// return <div className="time" style={{marginTop: time*12 + 'px'}}> | ||
// <h6 className="title is-6">{`${time} : 00`}</h6> | ||
// </div>; | ||
// } | ||
// }) | ||
// } | ||
// </div> | ||
// ); | ||
// } | ||
// } | ||
// <div className="time has-text-centered"> | ||
// <h6 className="title is-6">{this.props.time} : 00</h6> | ||
// </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters