Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
- Support `init` property in all module components. let it initializes easily.
- Fix the bug: Accordion typo.
  • Loading branch information
jessy1092 committed Dec 24, 2014
2 parents da1f81e + 492b84f commit 677a84c
Show file tree
Hide file tree
Showing 21 changed files with 390 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ bower install semantic-ui
+ [Statistic](https://github.com/jessy1092/react-semantify/blob/master/docs/Views.md#statistic) - Pre-release
- [Modules](https://github.com/jessy1092/react-semantify/blob/master/docs/Modules.md)
+ Accordion - Pre-release
+ [Accordion](https://github.com/jessy1092/react-semantify/blob/master/docs/Modules.md#accordion) - Pre-release
+ Checkbox - Pre-release
+ Dimmer - Pre-release
+ Dropdown - Pre-release
Expand Down
7 changes: 6 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release Notes
=============

## Version 0.1.1 - 2014/12/25

- Support `init` property in all module components. let it initializes easily.
- Fix the bug: Accordion typo.

## Version 0.1.0 - 2014/12/22

- Add State attribute: Disabled, Focus, Active, Loading, Error, Completed.
Expand All @@ -9,7 +14,7 @@ Release Notes
+ Header: `disable`
+ Icon: `disable`, `loading`
+ Image: `disable`
+ Input: `loading`, `focus`, 'error'
+ Input: `loading`, `focus`, `error`
+ Loader: `disable`
+ Reveal: `disable`
+ Segment: `disable`, `loading`
Expand Down
40 changes: 40 additions & 0 deletions docs/Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,43 @@ is equal to
```js
<div class="ui accordion example"></div>
```

### v0.1.1 2014/12/25

Now you can use `init` property in all module components.


# Accordion
A standard Accordion.

### Example

```html
<Accordion className="exampleaccordion" init={true}></Accordion>
```

is equal to

```html
<div class="ui accordion examplebutton"></div>
```

and call below Sementic-ui init function when element in the `componentDidMount` life cycle.
```js
$('.ui.accordion').accordion();
```

You also can use `init={param}` to transfer parameter.

ex.
```js
<div init={'refresh'}></div>
```

will transfer `'refresh'` to init function.

```js
$('.ui.accordion').accordion('refresh');
```

### Properties
180 changes: 169 additions & 11 deletions dst/react-semantify.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = global.Semantify = {
Steps: require('./elements/steps.jsx')(React),

// modules
Accordin: require('./modules/accordion.jsx')(React),
Accordion: require('./modules/accordion.jsx')(React),
Checkbox: require('./modules/checkbox.jsx')(React),
Dimmer: require('./modules/dimmer.jsx')(React),
Dropdown: require('./modules/dropdown.jsx')(React),
Expand Down Expand Up @@ -1196,8 +1196,19 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
$(this.getDOMNode()).accordion();
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).accordion();
} else {
$(this.getDOMNode()).accordion(this.props.init);
}
}
}
});

Expand All @@ -1222,6 +1233,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).checkbox();
} else {
$(this.getDOMNode()).checkbox(this.props.init);
}
}
}
});

Expand All @@ -1246,6 +1271,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).dimmer();
} else {
$(this.getDOMNode()).dimmer(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1274,8 +1313,19 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
$(this.getDOMNode()).dropdown();
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).dropdown();
} else {
$(this.getDOMNode()).dropdown(this.props.init);
}
}
}
});

Expand All @@ -1300,6 +1350,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).modal();
} else {
$(this.getDOMNode()).modal(this.props.init);
}
}
}
});

Expand All @@ -1324,6 +1388,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).popup();
} else {
$(this.getDOMNode()).popup(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1356,8 +1434,19 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
$(this.getDOMNode()).progress();
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).progress();
} else {
$(this.getDOMNode()).progress(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1389,8 +1478,19 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
$(this.getDOMNode()).rating();
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).rating();
} else {
$(this.getDOMNode()).rating(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1418,6 +1518,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).search();
} else {
$(this.getDOMNode()).search(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1446,11 +1560,18 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
if (typeof this.props.behavior != 'undefined') {
$(this.getDOMNode()).shape(this.props.behavior);
} else {
$(this.getDOMNode()).shape();
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).shape();
} else {
$(this.getDOMNode()).shape(this.props.init);
}
}
}
});
Expand Down Expand Up @@ -1479,6 +1600,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).sidebar();
} else {
$(this.getDOMNode()).sidebar(this.props.init);
}
}
}
});

Expand Down Expand Up @@ -1514,9 +1649,18 @@ module.exports = function (React) {
)
);
},

componentDidMount: function () {
if (typeof this.props.behavior != 'undefined') {
$(this.getDOMNode()).sticky(this.props.behavior);
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).sticky();
} else {
$(this.getDOMNode()).sticky(this.props.init);
}
}
}
});
Expand Down Expand Up @@ -1547,6 +1691,20 @@ module.exports = function (React) {
this.props.children
)
);
},

componentDidMount: function () {
if (typeof this.props.init != 'undefined') {
if (this.props.init === false) {
return;
}

if (this.props.init === true) {
$(this.getDOMNode()).tab();
} else {
$(this.getDOMNode()).tab(this.props.init);
}
}
}
});

Expand Down
4 changes: 2 additions & 2 deletions dst/react-semantify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "react-semantify",
"description": "Integrate Semantic-ui with react components.",
"version" : "0.1.0",
"version" : "0.1.1",
"keywords": [
"react",
"semantic-ui",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
Steps: require('./elements/steps.jsx')(React),

// modules
Accordin: require('./modules/accordion.jsx')(React),
Accordion: require('./modules/accordion.jsx')(React),
Checkbox: require('./modules/checkbox.jsx')(React),
Dimmer: require('./modules/dimmer.jsx')(React),
Dropdown: require('./modules/dropdown.jsx')(React),
Expand Down
2 changes: 1 addition & 1 deletion src/index_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = global.Semantify = {
Steps: require('./elements/steps.jsx')(React),

// modules
Accordin: require('./modules/accordion.jsx')(React),
Accordion: require('./modules/accordion.jsx')(React),
Checkbox: require('./modules/checkbox.jsx')(React),
Dimmer: require('./modules/dimmer.jsx')(React),
Dropdown: require('./modules/dropdown.jsx')(React),
Expand Down
Loading

0 comments on commit 677a84c

Please sign in to comment.