Skip to content

Instantly share code, notes, and snippets.

@macrozone
Created September 8, 2017 09:05
Show Gist options
  • Save macrozone/e96b750d546c1daab5c8d12eac0ea67b to your computer and use it in GitHub Desktop.
Save macrozone/e96b750d546c1daab5c8d12eac0ea67b to your computer and use it in GitHub Desktop.
tabSize: 2
storybook: true
generateComponentTests: false
generateContainerTests: false
modulesPath: src/modules
snakeCaseFileNames: false
templates:
- name: 'storybook'
text: |
// @flow
import React from 'react';
import { storiesOf } from '@storybook';
import { action } from '@storybook/addon-actions';
import <%= componentName %> from '../<%= componentFileName %>';
storiesOf('<%= moduleName %>.<%= componentName %>', module)
.add('default view',
() => (
<<%= componentName %> />
)
)
- name: 'container'
text: |
// @flow
import { compose } from 'recompose';
import { connect } from 'react-redux';
import <%= componentName %> from '../components/<%= componentFileName %>';
const <%= componentName %>Container = compose(
connect(
({ user }) => ({ user }),
dispatch => ({
}),
)
)(<%= componentName %>);
export default <%= componentName %>Container;
- name: 'component'
text: |
// @flow
import React from 'react'
import styled from 'styled-components'
const <%= componentName %>Base = styled.div`
`
const <%= componentName %> = () => (
<<%= componentName %>Base>
<%= componentName %>
</<%= componentName %>Base>
)
export default <%= componentName %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment