Skip to content

Commit

Permalink
fix: Set displayname when getComposeComponent. close #60
Browse files Browse the repository at this point in the history
  • Loading branch information
jessy1092 committed May 2, 2016
1 parent f5e7731 commit 617e5c8
Show file tree
Hide file tree
Showing 106 changed files with 543 additions and 57 deletions.
3 changes: 2 additions & 1 deletion src/collections/breadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui breadcrumb';
const componentName = 'Breadcrumb';

const Breadcrumb = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Breadcrumb;
3 changes: 2 additions & 1 deletion src/collections/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui form';
const componentName = 'Form';

const Form = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Form;
3 changes: 2 additions & 1 deletion src/collections/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui grid';
const componentName = 'Grid';

const Grid = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Grid;
3 changes: 2 additions & 1 deletion src/collections/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui menu';
const componentName = 'Menu';

const Menu = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Menu;
3 changes: 2 additions & 1 deletion src/collections/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui message';
const componentName = 'Message';

const Message = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Message;
3 changes: 2 additions & 1 deletion src/collections/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import React from 'react';
import filter from '../filter';

const defaultClassName = 'ui table';
const componentName = 'Table';

const Basic = ({children, ...other}) => (
<table {...other}>{children}</table>
);

const Table = new filter(Basic)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Table;
3 changes: 2 additions & 1 deletion src/commons/column.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from './div';

const defaultClassName = 'column';
const componentName = 'Column';

const Column = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Column;
3 changes: 2 additions & 1 deletion src/commons/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import Div from './div';

const stateArray = ['active'];
const defaultClassName = 'content';
const componentName = 'Content';

const Content = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Content;
3 changes: 2 additions & 1 deletion src/commons/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from './div';

const defaultClassName = 'field';
const componentName = 'Field';

const Field = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Field;
3 changes: 2 additions & 1 deletion src/commons/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from './div';

const defaultClassName = 'fields';
const componentName = 'Fields';

const Fields = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Fields;
3 changes: 2 additions & 1 deletion src/commons/row.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from './div';

const defaultClassName = 'row';
const componentName = 'Row';

const Row = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Row;
3 changes: 2 additions & 1 deletion src/commons/section.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import filter from '../filter';
import Unit from './unit';

const defaultClassName = 'section';
const componentName = 'Section';

const Section = new filter(Unit)
.typeFilter()
.colorFilter()
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Section;
3 changes: 2 additions & 1 deletion src/commons/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from './div';

const defaultClassName = 'text';
const componentName = 'Text';

const Text = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Text;
3 changes: 2 additions & 1 deletion src/commons/title.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import Div from './div';

const stateArray = ['active'];
const defaultClassName = 'title';
const componentName = 'Title';

const Title = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);


export default Title;
3 changes: 2 additions & 1 deletion src/elements/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import Unit from '../commons/unit';

const stateArray = ['disabled', 'active', 'loading'];
const defaultClassName = 'ui button';
const componentName = 'Button';

const Button = new filter(Unit)
.typeFilter()
.colorFilter()
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Button;
3 changes: 2 additions & 1 deletion src/elements/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui container';
const componentName = 'Container';

const Container = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Container;
3 changes: 2 additions & 1 deletion src/elements/divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui divider';
const componentName = 'Divider';

const Divider = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Divider;
3 changes: 2 additions & 1 deletion src/elements/flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import React from 'react';
import filter from '../filter';

const defaultClassName = 'flag';
const componentName = 'Flag';

const Basic = (props) => <i {...props}/>;

const Flag = new filter(Basic)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Flag;
3 changes: 2 additions & 1 deletion src/elements/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import Unit from '../commons/unit';

const stateArray = ['disabled'];
const defaultClassName = 'ui header';
const componentName = 'Header';

const Header = new filter(Unit)
.typeFilter()
.colorFilter()
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Header;
3 changes: 2 additions & 1 deletion src/elements/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import filter from '../filter';

const stateArray = ['disabled', 'loading'];
const defaultClassName = 'icon';
const componentName = 'Icon';

const Basic = (props) => <i {...props}/>;

const Icon = new filter(Basic)
.colorFilter()
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Icon;
3 changes: 2 additions & 1 deletion src/elements/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import filter from '../filter';

const stateArray = ['disabled'];
const defaultClassName = 'ui image';
const componentName = 'Image';

const Basic = (props) => <img {...props}/>;

const Image = new filter(Basic)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Image;
3 changes: 2 additions & 1 deletion src/elements/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import filter from '../filter';

const stateArray = ['loading', 'focus', 'error'];
const defaultClassName = 'ui input';
const componentName = 'Input';

const Basic = React.createClass({

Expand Down Expand Up @@ -33,6 +34,6 @@ const Basic = React.createClass({
const Input = new filter(Basic)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Input;
3 changes: 2 additions & 1 deletion src/elements/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import filter from '../filter';
import Unit from '../commons/unit';

const defaultClassName = 'ui label';
const componentName = 'Label';

const Label = new filter(Unit)
.typeFilter()
.colorFilter()
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Label;
3 changes: 2 additions & 1 deletion src/elements/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui list';
const componentName = 'List';

const List = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default List;
3 changes: 2 additions & 1 deletion src/elements/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import Div from '../commons/div';

const stateArray = ['disabled', 'active'];
const defaultClassName = 'ui loader';
const componentName = 'Loader';

const Loader = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Loader;
3 changes: 2 additions & 1 deletion src/elements/rail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui rail';
const componentName = 'Rail';

const Rail = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Rail;
3 changes: 2 additions & 1 deletion src/elements/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import Div from '../commons/div';

const stateArray = ['disabled'];
const defaultClassName = 'ui reveal';
const componentName = 'Reveal';

const Reveal = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Reveal;
3 changes: 2 additions & 1 deletion src/elements/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import Div from '../commons/div';

const stateArray = ['disabled', 'loading'];
const defaultClassName = 'ui segment';
const componentName = 'Segment';

const Segment = new filter(Div)
.colorFilter()
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Segment;
3 changes: 2 additions & 1 deletion src/elements/step.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import Div from '../commons/div';

const stateArray = ['active', 'completed', 'disabled'];
const defaultClassName = 'step';
const componentName = 'Step';

const Step = new filter(Div)
.stateFilter(stateArray)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Step;
3 changes: 2 additions & 1 deletion src/elements/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import filter from '../filter';
import Div from '../commons/div';

const defaultClassName = 'ui steps';
const componentName = 'Steps';

const Steps = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent();
.getComposeComponent(componentName);

export default Steps;
Loading

0 comments on commit 617e5c8

Please sign in to comment.