New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle all property accordions #111
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/Components/ExpansionPanel.jsx
Outdated
import ExpandIcon from '../assets/ExpandIcon.svg' | ||
|
||
|
||
/** Expansion panels are used to package property sets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/**
* Expansion panels are used to package property sets
* @param {string} detail title of the panel
* @param {string} summary content of the panel
* @param {boolean} expandState global control of the panel
* @param {Object} classes styles for the panel
* @return {Object}
*/
src/Components/ExpansionPanel.jsx
Outdated
* @return {Object} | ||
*/ | ||
export default function Property({detail, summary, expandState, classes}) { | ||
useEffect(()=>setExpand(expandState), [expandState]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEffect(() => setExpand(expandState), [expandState])
src/Components/ExpansionPanel.jsx
Outdated
<Accordion | ||
className={classes.accordian} | ||
expanded={expand === true} | ||
onChange={()=>setExpand(!expand)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onChange={() => setExpand(!expand)}>
src/Components/ItemProperties.jsx
Outdated
<h2 className = {classes.sectionTitle}>Property Sets</h2> | ||
<h2 className={classes.sectionTitle}> | ||
<div>Property Sets</div> | ||
<Toggle onChange={()=>setExpandAll(!expandAll)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Toggle onChange={() => setExpandAll(!expandAll)} />
src/Components/ItemProperties.jsx
Outdated
</Accordion> | ||
<li key={ndx} className={classes.section}> | ||
<ExpansionPanel | ||
summary={decodeIFCString(ps.Name.value)||'Property Set'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary={decodeIFCString(ps.Name.value) || 'Property Set'}
https://olegmoshkovich.github.io/Share/share/v/p/index.ifc/88/111/153/3768/191793