Feature(map): change caret when open
This commit is contained in:
@ -220,7 +220,6 @@
|
|||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 535px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,12 +256,10 @@
|
|||||||
.challenge-block-time {
|
.challenge-block-time {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #BBBBBB;
|
color: #BBBBBB;
|
||||||
display:block;
|
|
||||||
margin-left: 40px;
|
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@media (min-width: 721px) {
|
@media (min-width: 721px) {
|
||||||
margin-right: 20px;
|
// margin-right: 20px;
|
||||||
margin-top:-30px;
|
// margin-top: -30px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,23 @@ export class Block extends PureComponent {
|
|||||||
this.props.toggleThisPanel(eventKey);
|
this.props.toggleThisPanel(eventKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderHeader(isOpen, title, time, isCompleted) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h3 className={ isCompleted ? 'faded clear-fix' : 'clear-fix' }>
|
||||||
|
<FA
|
||||||
|
className='no-link-underline'
|
||||||
|
name={ isOpen ? 'caret-down' : 'caret-right' }
|
||||||
|
/>
|
||||||
|
<span>
|
||||||
|
{ title }
|
||||||
|
</span>
|
||||||
|
<span className='challenge-block-time'>({ time })</span>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
renderChallenges(challenges) {
|
renderChallenges(challenges) {
|
||||||
if (!Array.isArray(challenges) || !challenges.length) {
|
if (!Array.isArray(challenges) || !challenges.length) {
|
||||||
return <div>No Challenges Found</div>;
|
return <div>No Challenges Found</div>;
|
||||||
@ -71,12 +88,7 @@ export class Block extends PureComponent {
|
|||||||
collapsible={ true }
|
collapsible={ true }
|
||||||
eventKey={ dashedName || title }
|
eventKey={ dashedName || title }
|
||||||
expanded={ isOpen }
|
expanded={ isOpen }
|
||||||
header={
|
header={ this.renderHeader(isOpen, title, time) }
|
||||||
<div>
|
|
||||||
<h3><FA name='caret-right' />{ title }</h3>
|
|
||||||
<span className='challenge-block-time'>({ time })</span>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
id={ title }
|
id={ title }
|
||||||
key={ title }
|
key={ title }
|
||||||
onSelect={ this.handleSelect }
|
onSelect={ this.handleSelect }
|
||||||
|
@ -62,6 +62,18 @@ export class SuperBlock extends PureComponent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderHeader(isOpen, title, isCompleted) {
|
||||||
|
return (
|
||||||
|
<h2 className={ isCompleted ? 'faded' : '' }>
|
||||||
|
<FA
|
||||||
|
className='no-link-underline'
|
||||||
|
name={ isOpen ? 'caret-down' : 'caret-right' }
|
||||||
|
/>
|
||||||
|
{ title }
|
||||||
|
</h2>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
@ -76,7 +88,7 @@ export class SuperBlock extends PureComponent {
|
|||||||
collapsible={ true }
|
collapsible={ true }
|
||||||
eventKey={ dashedName || title }
|
eventKey={ dashedName || title }
|
||||||
expanded={ isOpen }
|
expanded={ isOpen }
|
||||||
header={ <h2><FA name='caret-right' />{ title }</h2> }
|
header={ this.renderHeader(isOpen, title) }
|
||||||
id={ title }
|
id={ title }
|
||||||
key={ dashedName || title }
|
key={ dashedName || title }
|
||||||
onSelect={ this.handleSelect }
|
onSelect={ this.handleSelect }
|
||||||
|
Reference in New Issue
Block a user