Skip to content

Instantly share code, notes, and snippets.

View wongni's full-sized avatar

Wonkun Kim wongni

  • Schneider Electric
  • Raleigh, NC, USA
View GitHub Profile
@wongni
wongni / app.js
Created November 25, 2016 19:43
Example of something
module.controller("statusController", function () {
var status = this;
status.steps = [{
num: 1,
name: "Make Pie"
}, {
num: 2,
name: "Bake Pie"
}, {
{
test: /\.css$/,
...
},
// Add the above block to below
{
test: /\.scss$/, // Change .css to .scss
use: [
require.resolve('style-loader'),
{
// config after eject: we're in ./config/
module.exports = {
dotenv: resolveApp('.env'),
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
yarnLockFile: resolveApp('yarn.lock'),
@wongni
wongni / index.js
Last active January 11, 2018 17:45
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
@import 'utils';
body {
margin: 0;
background: $oc-gray-8;
box-sizing: border-box;
}
* {
box-sizing: inherit;
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './styles/base.scss'
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
import React from 'react'
import styles from './ComponentName.scss'
import classNames from 'classnames/bind'
const cx = classNames.bind(styles)
const ComponentName = () => {
return (
<div className={cx('Component-name')}>
import React from 'react'
import styles from './ViewerTemplate.scss'
import classNames from 'classnames/bind'
const cx = classNames.bind(styles)
const ViewerTemplate = ({ viewer, spaceNavigator }) => {
return (
<div className={cx('viewer-template')}>
import React from 'react'
import styles from './Viewer.scss'
import classNames from 'classnames/bind'
const cx = classNames.bind(styles)
const Viewer = ({ mediaType, url, loading }) => {
return (
<div className={cx('viewer')}>
import React from 'react'
import styles from './SpaceNavigator.scss'
import classNames from 'classnames/bind'
const cx = classNames.bind(styles)
const SpaceNavigator = ({ onPrev, onNext }) => {
return (
<div className={cx('space-navigator')}>