Skip to content

Commit

Permalink
WorkspaceElasticWindow renders configured focused className if given …
Browse files Browse the repository at this point in the history
…and element is focused
  • Loading branch information
barmintor committed Oct 27, 2023
1 parent 1ae96f5 commit 147b73d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/WorkspaceElasticWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class WorkspaceElasticWindow extends Component {
*/
render() {
const {
classes,
companionWindowDimensions,
focused,
focusWindow,
Expand All @@ -33,6 +34,7 @@ class WorkspaceElasticWindow extends Component {
return (
<StyledRnd
focused={focused}
className={focused ? classes.focused : undefined}
key={`${layout.windowId}-${workspace.id}`}
size={{
height: layout.height + companionWindowDimensions.height,
Expand Down Expand Up @@ -67,6 +69,7 @@ class WorkspaceElasticWindow extends Component {
}

WorkspaceElasticWindow.propTypes = {
classes: PropTypes.objectOf(PropTypes.string),
companionWindowDimensions: PropTypes.shape({
height: PropTypes.number,
width: PropTypes.number,
Expand All @@ -86,6 +89,7 @@ WorkspaceElasticWindow.propTypes = {
};

WorkspaceElasticWindow.defaultProps = {
classes: {},
companionWindowDimensions: { height: 0, width: 0 },
focused: false,
focusWindow: () => {},
Expand Down

0 comments on commit 147b73d

Please sign in to comment.