Skip to content

Commit

Permalink
0.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
psimyn committed Aug 31, 2016
1 parent bd046db commit 5dbbafb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist-modules/AccordionItem/index.js
Expand Up @@ -222,7 +222,7 @@ AccordionItem.propTypes = {
className: _react.PropTypes.string,
expanded: _react.PropTypes.bool,
onClick: _react.PropTypes.func,
title: _react.PropTypes.string,
title: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.node]),
expandedClassName: _react.PropTypes.string,
style: _react.PropTypes.object,
titleClassName: _react.PropTypes.string
Expand Down
17 changes: 15 additions & 2 deletions dist-modules/AccordionItemTitle/index.js
Expand Up @@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _classnames = require('classnames');
Expand Down Expand Up @@ -40,14 +42,25 @@ var AccordionItemTitle = function (_Component) {
color: this.props.titleColor
};

var title = this.props.title;


if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
return _react2.default.cloneElement(title, {
onClick: this.props.onClick,
id: 'react-safona-item-title-' + this.props.uuid,
'aria-controls': 'react-sanfona-item-body-' + this.props.uuid
});
}

return _react2.default.createElement(
'h3',
{ 'aria-controls': 'react-sanfona-item-body-' + this.props.uuid,
className: (0, _classnames2.default)('react-sanfona-item-title', this.props.className),
id: 'react-safona-item-title-' + this.props.uuid,
onClick: this.props.onClick,
style: style },
this.props.title
title
);
}
}]);
Expand All @@ -61,6 +74,6 @@ exports.default = AccordionItemTitle;
AccordionItemTitle.propTypes = {
className: _react.PropTypes.string,
onClick: _react.PropTypes.func,
title: _react.PropTypes.string,
title: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.node]),
uuid: _react.PropTypes.string
};
19 changes: 16 additions & 3 deletions dist/react-sanfona.js
Expand Up @@ -514,7 +514,7 @@ return /******/ (function(modules) { // webpackBootstrap
className: _react.PropTypes.string,
expanded: _react.PropTypes.bool,
onClick: _react.PropTypes.func,
title: _react.PropTypes.string,
title: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.node]),
expandedClassName: _react.PropTypes.string,
style: _react.PropTypes.object,
titleClassName: _react.PropTypes.string
Expand Down Expand Up @@ -832,6 +832,8 @@ return /******/ (function(modules) { // webpackBootstrap
value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _classnames = __webpack_require__(2);
Expand Down Expand Up @@ -868,14 +870,25 @@ return /******/ (function(modules) { // webpackBootstrap
color: this.props.titleColor
};

var title = this.props.title;


if ((typeof title === 'undefined' ? 'undefined' : _typeof(title)) === 'object') {
return _react2.default.cloneElement(title, {
onClick: this.props.onClick,
id: 'react-safona-item-title-' + this.props.uuid,
'aria-controls': 'react-sanfona-item-body-' + this.props.uuid
});
}

return _react2.default.createElement(
'h3',
{ 'aria-controls': 'react-sanfona-item-body-' + this.props.uuid,
className: (0, _classnames2.default)('react-sanfona-item-title', this.props.className),
id: 'react-safona-item-title-' + this.props.uuid,
onClick: this.props.onClick,
style: style },
this.props.title
title
);
}
}]);
Expand All @@ -889,7 +902,7 @@ return /******/ (function(modules) { // webpackBootstrap
AccordionItemTitle.propTypes = {
className: _react.PropTypes.string,
onClick: _react.PropTypes.func,
title: _react.PropTypes.string,
title: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.node]),
uuid: _react.PropTypes.string
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-sanfona",
"version": "0.0.14",
"version": "0.0.15",
"description": "React accessible accordion component",
"main": "./dist-modules/index.js",
"scripts": {
Expand Down

0 comments on commit 5dbbafb

Please sign in to comment.