Skip to content

Commit

Permalink
added active prop to Day emotion component
Browse files Browse the repository at this point in the history
  • Loading branch information
homiebtc committed Oct 1, 2018
1 parent 62cbf5e commit 06db658
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
.vscode/
dist/
tmp/
.idea/
102 changes: 87 additions & 15 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/schedule/ScheduleItemCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ const CardText = styled('p')`
font-size: 1.25em;
`;

const Day = styled('h3')`
${TitleFont};
text-decoration: ${props => (props.active ? 'underline' : '')};
`;

export default class ScheduleItemCard extends React.PureComponent {
state = {
firstDay: true
Expand All @@ -54,10 +59,10 @@ export default class ScheduleItemCard extends React.PureComponent {
<CardTitle color={titleColor}>
<div>
<h3 onClick={() => this.changeDay(true)}>
{firstDay ? <u> Saturday 10/3 </u> : 'Saturday 10/3'}
<Day active={firstDay}> Saturday 10/3</Day>
</h3>
<h3 onClick={() => this.changeDay(false)}>
{firstDay ? 'Sunday 10/4' : <u> Sunday 10/4</u>}
<Day active={!firstDay}> Sunday 10/4</Day>
</h3>
</div>
</CardTitle>
Expand Down

0 comments on commit 06db658

Please sign in to comment.