# Your snippets # # Atom snippets allow you to enter a simple prefix in the editor and hit tab to # expand the prefix into a larger code block with templated values. # # You can create a new snippet in this file by typing "snip" and then hitting # tab. # # An example CoffeeScript snippet to expand log to console.log: # # '.source.coffee': # 'Console log': # 'prefix': 'log' # 'body': 'console.log $1' # # Each scope (e.g. '.source.coffee' above) can only be declared once. # # This file uses CoffeeScript Object Notation (CSON). # If you are unfamiliar with CSON, you can read more about it in the # Atom Flight Manual: # https://atom.io/docs/latest/using-atom-basic-customization#cson # 'SnippetName': # 'prefix': 'SnippetName' # 'body': """ # Hello Wolrd # """ '.source.js, .source.jsx, .source.styl, .source.css': 'lorem-pixel': 'prefix': 'lorem-pixel' 'body': """ http://lorempixel.com/${1:400}/${2:200}/${3:city/} """ 'border1': 'prefix': 'border1' 'body': """ border 1px solid red """ 'placeholderit': 'prefix': 'placeholderit' 'body': """ http://placehold.it/${1:600x400}/A66506/FFFFFF """ 'redevice': 'prefix': 'redevice' 'body': """ @require 'bundles/styleguide/learnerApp/deviceDimensionVariables' """ 'revariables': 'prefix': 'revariables' 'body': """ @require 'bundles/styleguide/learnerApp/variables' """ 'placeholderit-img': 'prefix': 'placeholderit-img' 'body': """ ${2:CourseraAlt} """ 'placeholderit-avatar': 'prefix': 'placeholderit-avatar' 'body': """ ${2:CourseraAlt} """ 'lorem-pixel-img': 'prefix': 'lorem-pixel-img' 'body': """ ${4:CourseraAlt} """ ".source.html, .source.jsx, .source.js": "fa-inc": "prefix":"fa-inc" "body":"" 'fa-star': 'prefix': 'fa-star' 'body': """ """ ########################## so-styles '.source.styl': 'recss-simple-story': 'prefix': 'recss-simple-story' 'body': """ @require '../../../__styles__/variables' .rc-${1:StyleColors} text-align center """ 'tem-css': 'prefix': 'tem-css' 'body': """ @require 'bundles/styleguide/learnerApp/deviceDimensionVariables' @require 'bundles/styleguide/learnerApp/variables' .rc-${1:CourseCard} h1 font-size 20px @media $phone-or-smaller .rc-${1:CourseCard} .h1 text-align center """ 'recss-variable-devide': 'prefix': 'recss-variable-devide' 'body': """ @require 'bundles/styleguide/learnerApp/deviceDimensionVariables' @require 'bundles/styleguide/learnerApp/variables' """ # '.source.styl, .source.js, .source.jsx': # 'bg': # 'prefix': 'SnippetName' # 'body': """ # Hello Wolrd # """ ########################## so-jsx '.source.js, .source.jsx': 'clo': 'prefix': 'clo' 'body': """ console.warn('---', ${1}); """ 'clo1': 'prefix': 'clo1' 'body': """ console.log('-- ${1:Component} --', this.props, this.state); """ 'clo-state': 'prefix': 'clo-state' 'body': """ console.warn('---', this.state); """ 'clo-props': 'prefix': 'clo-props' 'body': """ console.warn('---', this.props); """ 'es-propTypes': 'prefix': 'es-propTypes' 'body': """ // eslint-disable-line react/forbid-prop-types """ 'es-propTypes-block': 'prefix': 'es-propTypes-block' 'body': """ /* eslint-disable react/forbid-prop-types */ """ 'es-propTypes-no-unused': 'prefix': 'es-propTypes-no-unused' 'body': """ // eslint-disable-line react/no-unused-prop-types """ 'es-maxlen': 'prefix': 'es-maxlen' 'body': """ // eslint-disable-line max-len """ 'es-param-reassign': 'prefix': 'es-param-reassign' 'body': """ // eslint-disable-line no-param-reassign """ 're-pure': 'prefix': 're-pure' 'body': """ import {pure} from 'recompose'; """ 're-button': 'prefix': 're-button' 'body': """ import Button from 'bundles/coursera-ui/components/basic/Button'; """ 're-TrackedButton': 'prefix': 're-TrackedButton' 'body': """ import withSingleTracked from 'bundles/common/components/withSingleTracked'; import Button from 'bundles/coursera-ui/components/basic/Button'; const TrackedButton = withSingleTracked({type: 'BUTTON'})(Button); """ 'cu-button-link': 'prefix': 'cu-button-link' 'body': """ )) stories.add('as dynamic variables', () => { const name = text('Name', 'Arunoda Susiripala'); const age = number('Age', 89); const content = `I am ${name} and I'm ${age} years old.`; return (
{content}
); }); """ 'reButton': 'prefix': 'reButton' 'body': """ import Button from 'bundles/coursera-ui/components/basic/Button'; """ 'tem-Button': 'prefix': 'tem-Button' 'body': """