-
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.
Seperate the classes into different files
- Loading branch information
1 parent
ec2d5bc
commit c5843e8
Showing
5 changed files
with
77 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
|
||
class Collapsable extends React.Component { | ||
render() { | ||
let showCollapse = (this.props.open[this.props.serial]) ? 'collapse show' : 'collapse'; | ||
return ( | ||
<div className={showCollapse} id={"collapseExample"+this.props.serial-1} aria-expanded={this.props.open[this.props.serial]}> | ||
<div className="card card-block"> | ||
<div> | ||
<h6>Title {this.props.serial}</h6> | ||
<div id="event-title" /> | ||
<h6>Description {this.props.serial}</h6> | ||
<div id="event-description" /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Collapsable; |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
class Event extends React.Component { | ||
handleClick(event) { | ||
this.props.openCollapsable(this.props.serial); | ||
} | ||
render() { | ||
return ( | ||
<div> | ||
<div onClick={this.handleClick.bind(this)} className="event-picture" href={"#collapseExample"+this.props.serial} | ||
aria-expanded={this.props.open[this.props.serial]} aria-controls={"collapseExample"+this.props.serial}> | ||
<img className="img-fluid text-center event-poster" src="https://goo.gl/T2k8fq" alt="Event picture" /> | ||
<div id="event-poster" /> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Event; |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
|
||
class Tab extends React.Component { | ||
render() { | ||
return ( | ||
<div className="event-tab"> | ||
<li className="nav-item"> | ||
<a className="nav-link" href="#">{this.props.name}</a> | ||
</li> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Tab; |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import Tab from './tab'; | ||
|
||
class Tabs extends React.Component { | ||
render() { | ||
return ( | ||
<div className="event-tabs"> | ||
<ul className="nav nav-tabs justify-content-around"> | ||
<Tab name="Ongoing" /> | ||
<Tab name="Upcoming" /> | ||
<Tab name="Past" /> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Tabs; |