mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Add an active class on current session panel (#905)
* feat(session): add session_active class to panels * fix(active-session): rename active session class see #905 * fix(active-session): rename prop name to `isTermActive`
This commit is contained in:
parent
85968b71b3
commit
47f01f92e4
3 changed files with 3 additions and 1 deletions
|
|
@ -48,6 +48,7 @@ class TermGroup_ extends Component {
|
|||
const session = this.props.sessions[uid];
|
||||
const termRef = this.props.terms[uid];
|
||||
const props = getTermProps(uid, this.props, {
|
||||
isTermActive: uid === this.props.activeSession,
|
||||
term: termRef ? termRef.term : null,
|
||||
customCSS: this.props.customCSS,
|
||||
fontSize: this.props.fontSize,
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ export default class Term extends Component {
|
|||
ref={component => {
|
||||
this.termWrapperRef = component;
|
||||
}}
|
||||
className={css('fit')}
|
||||
className={css('fit', this.props.isTermActive && 'active')}
|
||||
onMouseDown={this.handleMouseDown}
|
||||
style={{padding: this.props.padding}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ export default class Terms extends Component {
|
|||
const props = getTermGroupProps(uid, this.props, {
|
||||
termGroup,
|
||||
terms: this.terms,
|
||||
activeSession: this.props.activeSession,
|
||||
sessions: this.props.sessions,
|
||||
customCSS: this.props.customCSS,
|
||||
fontSize: this.props.fontSize,
|
||||
|
|
|
|||
Loading…
Reference in a new issue