add package.json

This commit is contained in:
Boyuzhou 2016-10-19 10:54:45 +08:00
parent 2094f465fd
commit 1ed31ab39f
6 changed files with 39 additions and 12 deletions

0
js/addEventListener.js Normal file
View File

View File

@ -0,0 +1 @@
export splitComponent from './splitComponent';

0
js/ownerDocument.js Normal file
View File

22
js/splitComponent.js Normal file
View File

@ -0,0 +1,22 @@
/**
* 分割要传入父元素和子元素的props
* @param {[object]} props 传入的属性
* @param {[reactElement]} Component 组件
* @return {[array]} 返回数组第一个元素为父元素props对象第二个子元素props对象
*/
export default function splitComponentProps(props, Component) {
const componentPropTypes = Component.propTypes;
const parentProps = {};
const childProps = {};
Object.entries(props).forEach(([propName, propValue]) => {
if (componentPropTypes[propName]) {
parentProps[propName] = propValue;
} else {
childProps[propName] = propValue;
}
});
return [parentProps, childProps];
}

View File

@ -1,6 +1,6 @@
{
"name": "tinper-bee-core",
"version": "0.0.4",
"version": "0.0.5",
"description": "style core and js util for tinper-bee",
"main": "js/index.js",
"engines": {

View File

@ -182,7 +182,7 @@
@include typo-preferred-font($usePreferred);
font-size: 13/16 * $unit;
font-weight: 500;
text-transform: uppercase;
// text-transform: uppercase;
line-height: 1;
letter-spacing: 0;
@ -483,6 +483,10 @@
a{
color: #FFFFFF;
}
}
.u-menu-item.active>a{
background-color:$color;
}
.u-menu-item:focus {
outline: none;