Skip to content

Commit

Permalink
feat: setup import/export example
Browse files Browse the repository at this point in the history
  • Loading branch information
devfreddy committed Nov 21, 2019
1 parent 1a99f98 commit 9cc9d5a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
16 changes: 16 additions & 0 deletions src/components/Example/Example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';

import styles from './styles.css';

export default class ExampleComponent extends Component {
static propTypes = {
text: PropTypes.string
};

render() {
const { text } = this.props;

return <div className={styles.test}>Example Component: {text}</div>;
}
}
1 change: 1 addition & 0 deletions src/components/Example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Example';
17 changes: 1 addition & 16 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';

import styles from './styles.css';

export default class ExampleComponent extends Component {
static propTypes = {
text: PropTypes.string
};

render() {
const { text } = this.props;

return <div className={styles.test}>Example Component: {text}</div>;
}
}
export { default as Example } from './Example';

0 comments on commit 9cc9d5a

Please sign in to comment.