Skip to content

Commit eb6f8d5

Browse files
focused secondary text
1 parent a77d0e7 commit eb6f8d5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/LeftColExpansionPanel.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const LeftColExpansionPanel = (props) => {
2121
} = props;
2222
const { title, id, color } = component;
2323

24+
function isFocused() {
25+
return focusComponent.title === title ? 'focused' : '';
26+
}
27+
2428
return (
2529
<div className={classes.root}>
2630
<Grid item xs={12} md={6}>
@@ -34,7 +38,7 @@ const LeftColExpansionPanel = (props) => {
3438
{title}
3539
</Typography>
3640
}
37-
secondary={'focused'}
41+
secondary={isFocused()}
3842
style={{ color }}
3943
/>
4044
<ListItemSecondaryAction>
@@ -43,7 +47,7 @@ const LeftColExpansionPanel = (props) => {
4347
style={{ color, float: 'right' }}
4448
onClick={() => {
4549
console.log(title);
46-
addChild( { title } );
50+
addChild({ title });
4751
}}
4852
/>
4953
</IconButton>

0 commit comments

Comments
 (0)