add package.json
This commit is contained in:
parent
2094f465fd
commit
1ed31ab39f
|
@ -0,0 +1 @@
|
|||
export splitComponent from './splitComponent';
|
|
@ -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];
|
||||
}
|
|
@ -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": {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue