Make "Styles" and "Colors" consistently named
This commit is contained in:
parent
ec89e94449
commit
b9ee0f57f7
4 changed files with 13 additions and 19 deletions
|
|
@ -20,10 +20,8 @@ import * as utils from 'utils'
|
|||
|
||||
import glob from 'glob'
|
||||
import moment from 'moment'
|
||||
import fs from 'fs'
|
||||
import mkdirp from 'mkdirp'
|
||||
import jsfile from 'jsonfile'
|
||||
import rmdir from 'rimraf'
|
||||
|
||||
import {
|
||||
NOTEBOOK_TYPE,
|
||||
|
|
@ -38,7 +36,7 @@ const {
|
|||
Paper
|
||||
} = mui
|
||||
|
||||
const colors = Styles.Colors
|
||||
const Colors = Styles.Colors
|
||||
|
||||
const DefaultRawTheme = Styles.LightRawTheme
|
||||
|
||||
|
|
@ -184,7 +182,7 @@ export default class EntrySelector extends React.Component {
|
|||
touch={true}
|
||||
tooltip={note.tags.join(", ")}
|
||||
>
|
||||
<Tag color={colors.grey400}/>
|
||||
<Tag color={Colors.grey400}/>
|
||||
</IconButton>
|
||||
<div className="tag-list inline">
|
||||
{utils.trunc(note.tags.join(", "), 30)}
|
||||
|
|
@ -199,7 +197,7 @@ export default class EntrySelector extends React.Component {
|
|||
position: "absolute",
|
||||
top: 70,
|
||||
left: 20,
|
||||
color: colors.grey400,
|
||||
color: Colors.grey400,
|
||||
fontSize: 14
|
||||
}
|
||||
|
||||
|
|
@ -222,7 +220,7 @@ export default class EntrySelector extends React.Component {
|
|||
touch={true}
|
||||
onTouchTap={this.addNoteTapped}
|
||||
tooltip="Add New Note">
|
||||
<Add color={colors.grey600}/>
|
||||
<Add color={Colors.grey600}/>
|
||||
</IconButton>}
|
||||
hintText="Filter by keyword, title or tag."
|
||||
innerTextFieldWidth={210}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import ReactDOM from 'react-dom'
|
|||
import mui from 'material-ui'
|
||||
import getMuiTheme from 'material-ui/lib/styles/getMuiTheme'
|
||||
|
||||
import styles from 'material-ui/lib/styles'
|
||||
import List from 'material-ui/lib/lists/list'
|
||||
import ListItem from 'material-ui/lib/lists/list-item'
|
||||
import ActionGrade from 'material-ui/lib/svg-icons/action/grade'
|
||||
|
|
@ -27,8 +26,6 @@ import mkdirp from 'mkdirp'
|
|||
import jsfile from 'jsonfile'
|
||||
import rmdir from 'rimraf'
|
||||
|
||||
const colors = styles.Colors
|
||||
|
||||
String.prototype.trunc = String.prototype.trunc || function(n){
|
||||
return (this.length > n) ? this.substr(0, n-1)+'...' : this;
|
||||
};
|
||||
|
|
@ -42,6 +39,7 @@ const {
|
|||
Paper
|
||||
} = mui
|
||||
|
||||
const Colors = Styles.Colors
|
||||
const DefaultRawTheme = Styles.LightRawTheme
|
||||
|
||||
export default class LibraryNav extends React.Component {
|
||||
|
|
@ -90,7 +88,7 @@ export default class LibraryNav extends React.Component {
|
|||
|
||||
getChildContext() {
|
||||
return {
|
||||
muiTheme: getMuiTheme(DefaultRawTheme)
|
||||
muiTheme: this.context.muiTheme || getMuiTheme(DefaultRawTheme)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -338,7 +336,7 @@ export default class LibraryNav extends React.Component {
|
|||
innerDivStyle={{'paddingBottom': 0,
|
||||
'paddingTop': 0}}
|
||||
onTouchTap={this.noteBookTapped.bind(this, i)}
|
||||
leftIcon={<NoteBook color={colors.grey500}/>}
|
||||
leftIcon={<NoteBook color={Colors.grey500}/>}
|
||||
rightIcon={<Badge badgeContent={notebook.notes}/>}>
|
||||
|
||||
|
||||
|
|
@ -371,7 +369,7 @@ export default class LibraryNav extends React.Component {
|
|||
style={{padding: 0}}
|
||||
>
|
||||
<NoteBook
|
||||
color={colors.grey500}/>
|
||||
color={Colors.grey500}/>
|
||||
</IconButton>
|
||||
}
|
||||
rightIcon={<Badge
|
||||
|
|
@ -406,7 +404,7 @@ export default class LibraryNav extends React.Component {
|
|||
className="list"
|
||||
initialIndex={0}
|
||||
id="main-nav"
|
||||
selectedItemStyle={{backgroundColor: colors.lightBlue100}}
|
||||
selectedItemStyle={{backgroundColor: Colors.lightBlue100}}
|
||||
subheader="Library">
|
||||
{this.props.navigation.menuItems.map((item, i) => {
|
||||
return <ListItem
|
||||
|
|
@ -424,7 +422,7 @@ export default class LibraryNav extends React.Component {
|
|||
id="nblist"
|
||||
className="list"
|
||||
ref='notebookList'
|
||||
selectedItemStyle={{backgroundColor: colors.lightBlue100}}
|
||||
selectedItemStyle={{backgroundColor: Colors.lightBlue100}}
|
||||
subheader={<div>
|
||||
<div className="inline">NoteBooks</div>
|
||||
<IconButton
|
||||
|
|
@ -435,7 +433,7 @@ export default class LibraryNav extends React.Component {
|
|||
style={{'zIndex': 1000}}
|
||||
className="right inline">
|
||||
<AddCircleOutline
|
||||
color={colors.grey500}/>
|
||||
color={Colors.grey500}/>
|
||||
</IconButton>
|
||||
</div>}>
|
||||
{this.notebookList()}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ const {
|
|||
Paper
|
||||
} = mui
|
||||
|
||||
const colors = Styles.Colors
|
||||
const Colors = Styles.Colors
|
||||
|
||||
const DefaultRawTheme = Styles.LightRawTheme
|
||||
|
||||
|
|
@ -35,7 +35,6 @@ export default class SearchBar extends React.Component {
|
|||
}
|
||||
|
||||
blank(){
|
||||
|
||||
}
|
||||
|
||||
render(){
|
||||
|
|
@ -49,7 +48,7 @@ export default class SearchBar extends React.Component {
|
|||
id="search-bar"
|
||||
active={false}
|
||||
selected={false}
|
||||
leftIcon={<Search color={colors.grey600}/>}
|
||||
leftIcon={<Search color={Colors.grey600}/>}
|
||||
rightIconButton={this.props.rightIconButton}>
|
||||
<TextField
|
||||
hintText={this.props.hintText || ""}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React from 'react'
|
||||
|
||||
import styles from 'material-ui/lib/styles'
|
||||
import List from 'material-ui/lib/lists/list'
|
||||
import { SelectableContainerEnhance } from '../enhance/SelectableEnhance'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue