-
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.
Remove Expansion Panels, clean up Overview code
- Loading branch information
Showing
2 changed files
with
87 additions
and
94 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 |
---|---|---|
@@ -1,29 +1,22 @@ | ||
import React from "react"; | ||
import { InDepthView } from "./InDepthView"; | ||
import {ExpansionPanel, ExpansionPanelDetails} from "@material-ui/core"; | ||
import ExpansionPanelSummary from "@material-ui/core/ExpansionPanelSummary"; | ||
import Typography from "@material-ui/core/Typography"; | ||
|
||
export class InDepthSkillList extends React.Component { | ||
render() { | ||
this.collapsed = []; | ||
let skillList = this.props.skillList; | ||
let skillListComponents = []; | ||
for (let i = 0; i < skillList.length; i++) { | ||
this.collapsed[i] = !this.props.isDesktop; | ||
skillListComponents.push( | ||
<ExpansionPanel defaultExpanded={this.props.isDesktop}> | ||
<ExpansionPanelSummary><Typography>{skillList[i].name}</Typography></ExpansionPanelSummary> | ||
<ExpansionPanelDetails> | ||
<InDepthView | ||
skillObject={skillList[i]} | ||
isDesktop={this.props.isDesktop} | ||
/> | ||
</ExpansionPanelDetails> | ||
</ExpansionPanel> | ||
); | ||
|
||
} | ||
for (let i = 0; i < skillList.length; i++) { | ||
if (i === skillList.length - 1) { | ||
skillListComponents.push(<InDepthView skillObject={skillList[i]} isDesktop={this.props.isDesktop}/>); | ||
} | ||
else { | ||
skillListComponents.push( | ||
<React.Fragment><InDepthView skillObject={skillList[i]} | ||
isDesktop={this.props.isDesktop}/><hr /></React.Fragment> | ||
); | ||
} | ||
} | ||
return skillListComponents; | ||
} | ||
} |
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