Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flex_item component #310

Merged
merged 6 commits into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '1.2.0';
export default '1.2.2';
Loading