Skip to content

Commit

Permalink
Merge pull request #16 from msmsmsmsms/stylesheet-typo
Browse files Browse the repository at this point in the history
fixed typo in css scaffold (Stylesheet -> StyleSheet)
  • Loading branch information
shrugs authored Mar 11, 2017
2 parents 0240a6a + 460efb9 commit a444c9d
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 132 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install:
gem install atmomizr
gem install atomizr

atom:
atomizr -i "snippets/**/*.sublime-snippet" -o snippets.cson --merge
Expand Down
2 changes: 1 addition & 1 deletion snippets/StyleSheet_react_native.sublime-snippet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* @flow */
'use strict';
import { Stylesheet } from 'react-native';
import { StyleSheet } from 'react-native';
module.exports = StyleSheet.create({
${1}: ${2},
Expand Down
260 changes: 130 additions & 130 deletions snippets/snippets.cson
Original file line number Diff line number Diff line change
@@ -1,19 +1,74 @@
# Generated with Atomizr - /~https://github.com/idleberg/atomizr.rb
'.source.js,source.jsx':
'componentWillMount()':
'prefix': 'cwm'
'body': """
componentWillMount() {
${1}
}$0
"""
'componentDidMount()':
'prefix': 'cdm'
'body': """
componentDidMount() {
${1}
}$0
"""
'componentWillUnmount()':
'prefix': 'cwum'
'body': """
componentWillUnmount() {
${1}
}$0
"""
'alignItems: \'center\',':
'prefix': 'ai'
'body': 'alignItems: \'${1:center}\',$0'
'componentDidMount()':
'prefix': 'tss'
'Create react-native Class':
'prefix': 'rncc'
'body': """
this.setState({
${1:key}: ${2:\'value\'},
});$0
\'use strict\';
import React, { Component } from \'react\';
import {
StyleSheet,
View,
} from \'react-native\';
class ${1:${TM_FILENAME/(.+)\..+|.*/$1/:MyComponent}} extends Component {
render() {
return (
${2:<View />}
);
}
}
const styles = StyleSheet.create({
});
export default ${1:${TM_FILENAME/(.+)\..+|.*/$1/:MyComponent}};$0
"""
'componentDidUpdate(object prevProps, object prevState)':
'prefix': 'cdud'
'componentWillReceiveProps(object nextProps)':
'prefix': 'cwrp'
'body': """
componentDidUpdate(prevProps, prevState) {
componentWillReceiveProps(nextProps) {
${1}
}$0
"""
'componentWillUpdate(object nextProps, object nextState)':
'prefix': 'cwud'
'body': """
componentWillUpdate(nextProps, nextState) {
${1}
}$0
"""
'shouldComponentUpdate(object nextProps, object nextState)':
'prefix': 'scud'
'body': """
shouldComponentUpdate(nextProps, nextState) {
${1}
}$0
"""
Expand All @@ -27,6 +82,14 @@
/>
${4}$0
"""
'PickerIOS':
'prefix': 'rnPickerIOS'
'body': """
<PickerIOS
onValueChange={${1:this.onValueChange}}
selectedValue={${2}}
/>$0
"""
'DatePickerIOS':
'prefix': 'rnDatePickerIOS'
'body': """
Expand All @@ -52,33 +115,6 @@
/>
${3}$0
"""
'PickerIOS':
'prefix': 'rnPickerIOS'
'body': """
<PickerIOS
onValueChange={${1:this.onValueChange}}
selectedValue={${2}}
/>$0
"""
'Image':
'prefix': 'rnImage'
'body': """
<Image
style={${1}}
source={{uri: \'${2}\'}}
/>
${3}$0
"""
'ListView':
'prefix': 'rnListView'
'body': """
<ListView
style={${1}}
dataSource={${2:this.state.dataSource}}
renderRow={${3:(rowData) => ${4:<Text>{rowData\}</Text>}}}
/>
${5}$0
"""
'MapView':
'prefix': 'rnMapView'
'body': """
Expand All @@ -94,15 +130,25 @@
/>
${5}$0
"""
'Navigator':
'prefix': 'rnNavigator'
'ListView':
'prefix': 'rnListView'
'body': """
<Navigator
initialRoute={{name: \'${1:My First Scene}\', index: 0}}
renderScene={(route, navigator) => {
${2}
}}
/>$0
<ListView
style={${1}}
dataSource={${2:this.state.dataSource}}
renderRow={${3:(rowData) => ${4:<Text>{rowData\}</Text>}}}
/>
${5}$0
"""
'View':
'prefix': 'rnView'
'body': '<View style={styles.${1}}>${2}</View>$0'
'Text':
'prefix': 'rnText'
'body': """
<Text style={styles.${1}}>
${2}
</Text>$0
"""
'ScrollView':
'prefix': 'rnScrollView'
Expand All @@ -113,12 +159,14 @@
${3}
</ScrollView>$0
"""
'Text':
'prefix': 'rnText'
'Image':
'prefix': 'rnImage'
'body': """
<Text style={styles.${1}}>
${2}
</Text>$0
<Image
style={${1}}
source={{uri: \'${2}\'}}
/>
${3}$0
"""
'TouchableHighlight':
'prefix': 'rnTouchableHighlight'
Expand All @@ -130,100 +178,34 @@
${4}
</TouchableHighlight>$0
"""
'View':
'prefix': 'rnView'
'body': '<View style={styles.${1}}>${2}</View>$0'
'componentWillMount()':
'prefix': 'cwm'
'body': """
componentWillMount() {
${1}
}$0
"""
'componentWillReceiveProps(object nextProps)':
'prefix': 'cwrp'
'body': """
componentWillReceiveProps(nextProps) {
${1}
}$0
"""
'componentWillUnmount()':
'prefix': 'cwum'
'body': """
componentWillUnmount() {
${1}
}$0
"""
'componentWillUpdate(object nextProps, object nextState)':
'prefix': 'cwud'
'Navigator':
'prefix': 'rnNavigator'
'body': """
componentWillUpdate(nextProps, nextState) {
${1}
}$0
<Navigator
initialRoute={{name: \'${1:My First Scene}\', index: 0}}
renderScene={(route, navigator) => {
${2}
}}
/>$0
"""
'constructor()':
'prefix': 'constructor()'
'propTypes':
'prefix': 'propTypes'
'body': """
constructor(props) {
super(props);
this.state = {};
static propTypes = {
${2:prop}: React.PropTypes.${3:Type}
}$0
"""
'Create react-native Class':
'prefix': 'rncc'
'body': """
\'use strict\';
import React, { Component } from \'react\';
import {
StyleSheet,
View,
} from \'react-native\';
class ${1:${TM_FILENAME/(.+)\..+|.*/$1/:MyComponent}} extends Component {
render() {
return (
${2:<View />}
);
}
}
const styles = StyleSheet.create({
});
export default ${1:${TM_FILENAME/(.+)\..+|.*/$1/:MyComponent}};$0
"""
'defaultProps':
'prefix': 'defaultProps'
'body': """
static defaultProps = {
${2:prop}: ${3:\'value\'}
}$0
"""
'flex: 1':
'prefix': 'f1'
'body': 'flex: ${1:1},$0'
'justifyContent: \'center\',':
'prefix': 'jc'
'body': 'justifyContent: \'${1:center}\',$0'
'propTypes':
'prefix': 'propTypes'
'body': """
static propTypes = {
${2:prop}: React.PropTypes.${3:Type}
}$0
"""
'React.PropTypes.':
'prefix': 'rpt'
'body': 'React.PropTypes.${1}$0'
'shouldComponentUpdate(object nextProps, object nextState)':
'prefix': 'scud'
'componentDidUpdate(object prevProps, object prevState)':
'prefix': 'cdud'
'body': """
shouldComponentUpdate(nextProps, nextState) {
componentDidUpdate(prevProps, prevState) {
${1}
}$0
"""
Expand All @@ -234,15 +216,33 @@
${1}: ${2},
});$0
"""
'flex: 1':
'prefix': 'f1'
'body': 'flex: ${1:1},$0'
'Create StyleSheet':
'prefix': 'css'
'body': """
/* @flow */
\'use strict\';
import { Stylesheet } from \'react-native\';
import { StyleSheet } from \'react-native\';
module.exports = StyleSheet.create({
${1}: ${2},
});$0
"""
'justifyContent: \'center\',':
'prefix': 'jc'
'body': 'justifyContent: \'${1:center}\',$0'
'constructor()':
'prefix': 'constructor()'
'body': """
constructor(props) {
super(props);
this.state = {};
}$0
"""
'React.PropTypes.':
'prefix': 'rpt'
'body': 'React.PropTypes.${1}$0'

0 comments on commit a444c9d

Please sign in to comment.