mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 21:28:40 -09:00
use inline styles overrides :)
cc @jedwatson
This commit is contained in:
parent
bee6ba0072
commit
450e337e11
4 changed files with 4 additions and 8 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Tabs_ from './tabs';
|
import Tabs_ from './tabs';
|
||||||
import overrideStyles from '../utils/override-style';
|
|
||||||
import Component from '../component';
|
import Component from '../component';
|
||||||
import { decorate, getTabsProps } from '../utils/plugins';
|
import { decorate, getTabsProps } from '../utils/plugins';
|
||||||
|
|
||||||
|
|
@ -62,7 +61,7 @@ export default class Header extends Component {
|
||||||
onChange: this.onChangeIntent
|
onChange: this.onChangeIntent
|
||||||
});
|
});
|
||||||
return <header
|
return <header
|
||||||
ref={ overrideStyles({ backgroundColor }) }
|
style={{ backgroundColor }}
|
||||||
className={ css('header', isMac && 'headerRounded') }
|
className={ css('header', isMac && 'headerRounded') }
|
||||||
onMouseDown={ this.onHeaderMouseDown }>
|
onMouseDown={ this.onHeaderMouseDown }>
|
||||||
{ this.props.customChildrenBefore }
|
{ this.props.customChildrenBefore }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Component from '../component';
|
import Component from '../component';
|
||||||
import overrideStyle from '../utils/override-style';
|
|
||||||
|
|
||||||
export default class Tab extends Component {
|
export default class Tab extends Component {
|
||||||
constructor () {
|
constructor () {
|
||||||
|
|
@ -28,7 +27,7 @@ export default class Tab extends Component {
|
||||||
onMouseEnter={ this.hover }
|
onMouseEnter={ this.hover }
|
||||||
onMouseLeave={ this.blur }
|
onMouseLeave={ this.blur }
|
||||||
onClick={ this.props.onClick }
|
onClick={ this.props.onClick }
|
||||||
ref={ overrideStyle({ borderColor }) }
|
style={{ borderColor }}
|
||||||
className={ css(
|
className={ css(
|
||||||
'tab',
|
'tab',
|
||||||
isFirst && 'first',
|
isFirst && 'first',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import Tab_ from './tab';
|
import Tab_ from './tab';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Component from '../component';
|
import Component from '../component';
|
||||||
import overrideStyle from '../utils/override-style';
|
|
||||||
import { decorate, getTabProps } from '../utils/plugins';
|
import { decorate, getTabProps } from '../utils/plugins';
|
||||||
|
|
||||||
const Tab = decorate(Tab_, 'Tab');
|
const Tab = decorate(Tab_, 'Tab');
|
||||||
|
|
@ -22,7 +21,7 @@ export default class Tabs extends Component {
|
||||||
? 1 === tabs.length
|
? 1 === tabs.length
|
||||||
? <div className={ css('title') }>{ tabs[0].title }</div>
|
? <div className={ css('title') }>{ tabs[0].title }</div>
|
||||||
: <ul
|
: <ul
|
||||||
ref={overrideStyle({ borderColor })}
|
style={{ borderColor }}
|
||||||
className={ css('list') }>
|
className={ css('list') }>
|
||||||
{
|
{
|
||||||
tabs.map((tab, i) => {
|
tabs.map((tab, i) => {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import TermsContainer from './terms';
|
||||||
import NotificationsContainer from './notifications';
|
import NotificationsContainer from './notifications';
|
||||||
import Component from '../component';
|
import Component from '../component';
|
||||||
import Mousetrap from 'mousetrap';
|
import Mousetrap from 'mousetrap';
|
||||||
import overrideStyles from '../utils/override-style';
|
|
||||||
import { moveTo, moveLeft, moveRight } from '../actions/ui';
|
import { moveTo, moveLeft, moveRight } from '../actions/ui';
|
||||||
import { connect } from '../utils/plugins';
|
import { connect } from '../utils/plugins';
|
||||||
|
|
||||||
|
|
@ -74,7 +73,7 @@ class HyperTerm extends Component {
|
||||||
const { isMac, customCSS, borderColor } = this.props;
|
const { isMac, customCSS, borderColor } = this.props;
|
||||||
return <div onClick={ this.focusActive }>
|
return <div onClick={ this.focusActive }>
|
||||||
<div
|
<div
|
||||||
ref={ overrideStyles({ borderColor }) }
|
style={{ borderColor }}
|
||||||
className={ css('main', isMac && 'mainRounded') }>
|
className={ css('main', isMac && 'mainRounded') }>
|
||||||
<HeaderContainer />
|
<HeaderContainer />
|
||||||
<TermsContainer ref_={this.onTermsRef} />
|
<TermsContainer ref_={this.onTermsRef} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue