Skip to content

Commit

Permalink
split out enabled style for branch select button
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Feb 14, 2020
1 parent 45b4a30 commit f75c2a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { classes } from 'typestyle';
import { Dialog, showDialog } from '@jupyterlab/apputils';
import { PathExt } from '@jupyterlab/coreutils';

import {
// NOTE: keep in alphabetical order
branchIconClass,
Expand All @@ -14,6 +15,7 @@ import {
toolbarButtonClass,
toolbarClass,
toolbarMenuButtonClass,
toolbarMenuButtonEnabledClass,
toolbarMenuButtonIconClass,
toolbarMenuButtonSubtitleClass,
toolbarMenuButtonTitleClass,
Expand Down Expand Up @@ -248,7 +250,10 @@ export class Toolbar extends React.Component<IToolbarProps, IToolbarState> {
return (
<div className={toolbarMenuWrapperClass}>
<button
className={toolbarMenuButtonClass}
className={classes(
toolbarMenuButtonClass,
toolbarMenuButtonEnabledClass
)}
title={`Change the current branch: ${this.state.branch}`}
onClick={this._onBranchClick}
>
Expand Down
4 changes: 3 additions & 1 deletion src/style/Toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ export const toolbarMenuButtonClass = style({
border: 'none',
borderRadius: 0,

background: 'var(--jp-layout-color1)',
background: 'var(--jp-layout-color1)'
});

export const toolbarMenuButtonEnabledClass = style({
$nest: {
'&:hover': {
backgroundColor: 'var(--jp-layout-color2)'
Expand Down

0 comments on commit f75c2a6

Please sign in to comment.