Skip to content

Commit

Permalink
Merge pull request #310 from z2014/master
Browse files Browse the repository at this point in the history
fix flex_item component
  • Loading branch information
aquariuslt committed Sep 2, 2019
2 parents c503186 + dad6fd6 commit f3c9d6d
Show file tree
Hide file tree
Showing 4 changed files with 682 additions and 250 deletions.
8 changes: 4 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "react-weui",
"version": "1.2.0",
"version": "1.2.2",
"description": "weui for react",
"main": "./build/packages/index.js",
"scripts": {
Expand Down Expand Up @@ -33,8 +33,8 @@
},
"homepage": "https://github.com/weui/react-weui",
"dependencies": {
"babel-runtime": "^6.18.0",
"prop-types": "^15.5.10",
"babel-runtime": "^6.26.0",
"prop-types": "^15.7.2",
"weui": "^1.1.0"
},
"devDependencies": {
Expand Down Expand Up @@ -95,7 +95,7 @@
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-less": "^0.1.3",
"rollup-plugin-less": "0.1.3",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-progress": "^0.2.1",
"rollup-plugin-replace": "^1.1.1",
Expand Down
7 changes: 3 additions & 4 deletions src/components/flex/flex_item.js
Expand Up @@ -8,8 +8,7 @@ import PropTypes from 'prop-types';
*
*/
const FlexItem = (props) => {
const { component, children, ...others } = props;
const Component = component;
const { Component, children, ...others } = props;
return (
<Component className="weui-flex__item" {...others}>
{ children }
Expand All @@ -22,11 +21,11 @@ FlexItem.propTypes = {
* pass component to replace the component but maintaing style
*
*/
component: PropTypes.node
Component: PropTypes.node
};

FlexItem.defaultProps = {
component: 'div'
Component: 'div'
};

export default FlexItem;
2 changes: 1 addition & 1 deletion src/version.js
@@ -1 +1 @@
export default '1.2.0';
export default '1.2.2';

0 comments on commit f3c9d6d

Please sign in to comment.