Skip to content

Commit

Permalink
Merge pull request #34 from jessy1092/export
Browse files Browse the repository at this point in the history
ES6 module import error fix #14
  • Loading branch information
jessy1092 committed Nov 22, 2015
2 parents 5f12158 + 6bfcbbf commit 8de099c
Show file tree
Hide file tree
Showing 58 changed files with 239 additions and 136 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Ex. Write a simple button in browser.
</script>
```

### With Browserify
### With Browserify or Webpack

```sh
npm install react-semantify
Expand All @@ -76,7 +76,13 @@ Ex.
```js
import React from 'react';
import ReactDOM from 'react-dom';
let Button = require('react-semantify').Button;
import {Button} from 'react-semantify';
// or
// import * as Semantify from 'react-semantify';
// let {Button} = Semantify;
// or
// use ES5
// let Button = require('react-semantify').Button;

let HelloBox = React.createClass({

Expand Down
4 changes: 3 additions & 1 deletion src/collections/breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui breadcrumb';

module.exports = React.createClass({
const Breadcrumb = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Breadcrumb;
4 changes: 3 additions & 1 deletion src/collections/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui form';

module.exports = React.createClass({
const Form = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Form;
4 changes: 3 additions & 1 deletion src/collections/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui grid';

module.exports = React.createClass({
const Grid = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Grid;
4 changes: 3 additions & 1 deletion src/collections/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui menu';

module.exports = React.createClass({
const Menu = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Menu;
4 changes: 3 additions & 1 deletion src/collections/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui message';

module.exports = React.createClass({
const Message = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Message;
4 changes: 3 additions & 1 deletion src/collections/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui table';

module.exports = React.createClass({
const Table = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Table;
4 changes: 3 additions & 1 deletion src/commons/column.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'column';

module.exports = React.createClass({
const Column = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Column;
6 changes: 4 additions & 2 deletions src/commons/content.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import Unit from './unit';
import {Unit} from './unit';

let defaultClassName = 'content';

module.exports = React.createClass({
const Content = React.createClass({

mixins: [ClassGenerator, StateSelector],

Expand All @@ -24,3 +24,5 @@ module.exports = React.createClass({
);
}
});

export default Content;
4 changes: 3 additions & 1 deletion src/commons/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'field';

module.exports = React.createClass({
const Field = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Field;
4 changes: 3 additions & 1 deletion src/commons/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'fields';

module.exports = React.createClass({
const Fields = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Fields;
4 changes: 3 additions & 1 deletion src/commons/row.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'row';

module.exports = React.createClass({
const Row = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Row;
6 changes: 4 additions & 2 deletions src/commons/section.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import ColorSelector from '../mixins/colorSelector';
import TypeSelector from '../mixins/typeSelector';
import Unit from './unit';
import {Unit} from './unit';

let defaultClassName = 'section';

module.exports = React.createClass({
const Section = React.createClass({

mixins: [ClassGenerator, ColorSelector, TypeSelector],

Expand All @@ -24,3 +24,5 @@ module.exports = React.createClass({
);
}
});

export default Section;
4 changes: 3 additions & 1 deletion src/commons/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'text';

module.exports = React.createClass({
const Text = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -18,3 +18,5 @@ module.exports = React.createClass({
);
}
});

export default Text;
6 changes: 4 additions & 2 deletions src/commons/title.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import Unit from './unit';
import {Unit} from './unit';

let defaultClassName = 'title';

module.exports = React.createClass({
const Title = React.createClass({

mixins: [ClassGenerator, StateSelector],

Expand All @@ -24,3 +24,5 @@ module.exports = React.createClass({
);
}
});

export default Title;
2 changes: 1 addition & 1 deletion src/commons/unit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import classSet from 'classnames';

module.exports = React.createClass({
export const Unit = React.createClass({

propTypes: {
className: React.PropTypes.string.isRequired,
Expand Down
6 changes: 4 additions & 2 deletions src/elements/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import ColorSelector from '../mixins/colorSelector';
import StateSelector from '../mixins/stateSelector';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'ui button';

module.exports = React.createClass({
const Button = React.createClass({

mixins: [ClassGenerator, ColorSelector, StateSelector],

Expand All @@ -27,3 +27,5 @@ module.exports = React.createClass({
);
}
});

export default Button;
4 changes: 3 additions & 1 deletion src/elements/divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ClassGenerator from '../mixins/classGenerator';

let defaultClassName = 'ui divider';

module.exports = React.createClass({
const Divider = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -15,3 +15,5 @@ module.exports = React.createClass({
);
}
});

export default Divider;
6 changes: 4 additions & 2 deletions src/elements/flag.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'flag';

module.exports = React.createClass({
const Flag = React.createClass({

mixins: [ClassGenerator],

Expand All @@ -21,3 +21,5 @@ module.exports = React.createClass({
);
}
});

export default Flag;
6 changes: 4 additions & 2 deletions src/elements/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import ClassGenerator from '../mixins/classGenerator';
import ColorSelector from '../mixins/colorSelector';
import TypeSelector from '../mixins/typeSelector';
import StateSelector from '../mixins/stateSelector';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'ui header';

module.exports = React.createClass({
const Header = React.createClass({

mixins: [ClassGenerator, ColorSelector, TypeSelector, StateSelector],

Expand All @@ -26,3 +26,5 @@ module.exports = React.createClass({
);
}
});

export default Header;
6 changes: 4 additions & 2 deletions src/elements/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import ColorSelector from '../mixins/colorSelector';
import StateSelector from '../mixins/stateSelector';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'icon';

module.exports = React.createClass({
const Icon = React.createClass({

mixins: [ClassGenerator, ColorSelector, StateSelector],

Expand All @@ -25,3 +25,5 @@ module.exports = React.createClass({
);
}
});

export default Icon;
6 changes: 4 additions & 2 deletions src/elements/image.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'ui image';

module.exports = React.createClass({
const Image = React.createClass({

mixins: [ClassGenerator, StateSelector],

Expand All @@ -24,3 +24,5 @@ module.exports = React.createClass({
);
}
});

export default Image;
6 changes: 4 additions & 2 deletions src/elements/input.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
import StateSelector from '../mixins/stateSelector';
import Unit from '../commons/unit';
import {Unit} from '../commons/unit';

let defaultClassName = 'ui input';

module.exports = React.createClass({
const Input = React.createClass({

mixins: [ClassGenerator, StateSelector],

Expand Down Expand Up @@ -43,3 +43,5 @@ module.exports = React.createClass({

}
});

export default Input;
Loading

0 comments on commit 8de099c

Please sign in to comment.