Skip to content

Commit

Permalink
Merge d3caee2 into 4c823ce
Browse files Browse the repository at this point in the history
  • Loading branch information
javpet committed Aug 31, 2019
2 parents 4c823ce + d3caee2 commit e627416
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/components/Performance/PerformanceBio/PerformanceBio.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ const PerformanceBio = () => {
return (
<React.Fragment>
<PerformanceCarousel />
<PerformanceBioDetail heading="About the Performance" content={content} />
<PerformanceBioDetail heading="About the Artist" content={content} />
<div className="performance-bio-detail-wrapper">
<PerformanceBioDetail
heading="About the Performance"
content={content}
/>
<PerformanceBioDetail heading="About the Artist" content={content} />
</div>
</React.Fragment>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
.performance-bio-detail-container {
.performance-bio-detail-wrapper {
grid-column: 1/6;
margin-bottom: $margin-l;
grid-row: 2;

.performance-bio-detail__content {
margin-bottom: 0;
.performance-bio-detail-container {
margin-top: $margin-l;
}

.performance-bio-detail-container:first-of-type {
margin-top: $margin-s;
}

.performance-bio-detail__heading {
Expand Down
27 changes: 27 additions & 0 deletions src/components/Performance/Ticket/Ticket.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react'
import TicketBlock from './TicketBlock'

const Ticket = () => {
return (
<div className="ticket-wrapper white">
<h5>Available tickets</h5>
<div className="ticket-blocks">
<TicketBlock
ticketPrice={10}
ticketDetails="Single ticket for 1 person"
/>
<TicketBlock
ticketPrice={15}
ticketDetails="Pair ticket for 2 people"
/>
<TicketBlock
ticketPrice={35}
ticketDetails="Group of friends (5 people)"
/>
<TicketBlock ticketPrice={70} ticketDetails="VIP and table service" />
</div>
</div>
)
}

export default Ticket
47 changes: 47 additions & 0 deletions src/components/Performance/Ticket/Ticket.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.ticket-wrapper {
grid-column: 7/-1;
grid-row: 2;
margin-top: $margin-s;
margin-bottom: $margin-l;
margin-left: $margin-l;

.ticket-blocks {
margin-top: $margin-s;

.ticket-block {
display: flex;
margin-bottom: $margin-xs;

.ticket-block-amount {
padding: $padding-r;
background-color: $primary-color-darkblue-lighter;
display: flex;
align-items: center;
}

.ticket-block-option {
display: flex;
align-items: center;
padding: $padding-r;
background-color: $primary-color-darkblue-lighter;
border-left: 1px solid $primary-color-darkblue;
flex-grow: 1;
}

.ticket-block-buttons {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: $padding-s;
min-width: 180px;
background-color: $primary-color-darkblue-lighter;
border-left: 1px solid $primary-color-darkblue;

.ticket-button {
margin-bottom: $margin-xs;
}
}
}
}
}
20 changes: 20 additions & 0 deletions src/components/Performance/Ticket/Ticket.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react'
import Ticket from './Ticket'

import { shallow } from 'enzyme'

describe('<Ticket />', () => {
let ticketWrapper

beforeEach(() => {
ticketWrapper = shallow(<Ticket />)
})

it('has a title Available tickets', () => {
expect(ticketWrapper.find('h5').text()).toEqual('Available tickets')
})

it('has some tickets available to buy', () => {
expect(ticketWrapper.find('TicketBlock').exists()).toBe(true)
})
})
23 changes: 23 additions & 0 deletions src/components/Performance/Ticket/TicketBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'
import PropTypes from 'prop-types'

const TicketBlock = props => {
return (
<div className="ticket-block">
<div className="ticket-block-amount">
<h5>${props.ticketPrice}</h5>
</div>
<p className="ticket-block-option">{props.ticketDetails}</p>
<div className="ticket-block-buttons">
<button className="ticket-button">Buy ticket</button>
</div>
</div>
)
}

TicketBlock.propTypes = {
ticketPrice: PropTypes.number.isRequired,
ticketDetails: PropTypes.string.isRequired
}

export default TicketBlock
2 changes: 1 addition & 1 deletion src/containers/Performance/Attendance/Attendance.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.attendance-wrapper {
grid-column: 7/-1;
grid-row: 2;
grid-row: 3;
margin-left: $margin-l;
}

Expand Down
2 changes: 2 additions & 0 deletions src/containers/Performance/Performance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from 'react'
import PerformanceBio from '../../components/Performance/PerformanceBio/PerformanceBio'
import Ticket from '../../components/Performance/Ticket/Ticket'
import Campaign from '../../components/Shared/Campaign/Campaign'
import Attendance from './Attendance/Attendance'

Expand All @@ -15,6 +16,7 @@ class Performance extends Component {
daysToGo={23}
organization="Beyonce"
/>
<Ticket />
<Attendance />
</React.Fragment>
)
Expand Down
1 change: 1 addition & 0 deletions src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
@import "components/Cause/RelatedCause/RelatedCause.scss";
@import "components/Causes/CauseCard/CauseCard.scss";
@import "components/Performance/PerformanceBio/PerformanceCarousel.scss";
@import "components/Performance/Ticket/Ticket.scss";
@import "components/Performance/PerformanceBio/PerformanceBioDetail.scss";
@import "components/Performances/PerformanceCard/PerformanceCard.scss";
@import "containers/Performance/Attendance/Attendance.scss";
Expand Down

0 comments on commit e627416

Please sign in to comment.