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;
@ -326,7 +326,7 @@
@mixin badge-variant($color, $bg) {
color: $color;
background-color: $bg;
&[href] {
&:hover,
&:focus {
@ -407,13 +407,13 @@
background-color: $color-opacity;
}
.bufferbar{
background:none;
background:none;
background-color: $color-opacity;
}
.progressbar{
background-color: $color;
}
}
@ -483,6 +483,10 @@
a{
color: #FFFFFF;
}
}
.u-menu-item.active>a{
background-color:$color;
}
.u-menu-item:focus {
outline: none;
@ -496,17 +500,17 @@
// utilities
// font-weight
@mixin font-weight-light(){
@mixin font-weight-light(){
font-weight: $font-weight-light;
}
@mixin font-weight-normal(){
font-weight: $font-weight-normal;
@mixin font-weight-normal(){
font-weight: $font-weight-normal;
}
@mixin font-weight-medium(){
font-weight: $font-weight-medium;
@mixin font-weight-medium(){
font-weight: $font-weight-medium;
}
@mixin font-weight-bold(){
font-weight: $font-weight-bold;
@mixin font-weight-bold(){
font-weight: $font-weight-bold;
}
// text