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