Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-button

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-button - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

29

build/Button.js

@@ -45,3 +45,3 @@ 'use strict';

*/
shape: _react.PropTypes.oneOf(['block', 'round', 'squared', 'floating', 'pillRight', 'pillLeft', 'icon']),
shape: _react.PropTypes.oneOf(['block', 'round', 'border', 'squared', 'floating', 'pillRight', 'pillLeft', 'icon']),

@@ -95,2 +95,3 @@ bordered: _react.PropTypes.bool,

round: 'round',
border: 'border',
squared: 'squared',

@@ -113,15 +114,14 @@ floating: 'floating',

Button.prototype.render = function render() {
var _props = this.props;
var colors = _props.colors;
var shape = _props.shape;
var disabled = _props.disabled;
var className = _props.className;
var size = _props.size;
var bordered = _props.bordered;
var children = _props.children;
var htmlType = _props.htmlType;
var clsPrefix = _props.clsPrefix;
var _props = this.props,
colors = _props.colors,
shape = _props.shape,
disabled = _props.disabled,
className = _props.className,
size = _props.size,
bordered = _props.bordered,
children = _props.children,
htmlType = _props.htmlType,
clsPrefix = _props.clsPrefix,
others = _objectWithoutProperties(_props, ['colors', 'shape', 'disabled', 'className', 'size', 'bordered', 'children', 'htmlType', 'clsPrefix']);
var others = _objectWithoutProperties(_props, ['colors', 'shape', 'disabled', 'className', 'size', 'bordered', 'children', 'htmlType', 'clsPrefix']);
var clsObj = {};

@@ -134,2 +134,3 @@ if (className) {

}
if (shapeMap[shape]) {

@@ -141,3 +142,3 @@ clsObj[clsPrefix + '-' + shapeMap[shape]] = true;

}
clsObj[clsPrefix + '-border'] = bordered;
//clsObj[`${clsPrefix}-border`] = bordered;
var classes = (0, _classnames2["default"])(clsPrefix, clsObj);

@@ -144,0 +145,0 @@ return _react2["default"].createElement(

|时间|说明|修复版本|
|---|----|---|
|2017-8-29|修改示例|0.2.7|
|2017-8-29|修改示例|0.2.7|
|2017-9-4|修复shaper:border 没有效果|0.2.8|

@@ -18,2 +18,3 @@ /**

<Button shape="border">border</Button>
<Button shape="round">round</Button>
</div>

@@ -20,0 +21,0 @@ )

@@ -14,3 +14,3 @@

var Demo1 = require("./demolist/Demo1");var Demo2 = require("./demolist/Demo2");var Demo3 = require("./demolist/Demo3");var Demo4 = require("./demolist/Demo4");var DemoArray = [{"example":<Demo1 />,"title":" 默认按钮","code":"/**\n *\n * @title 默认按钮\n * @description 基础按钮\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button>Default</Button>\n <Button disabled>disabled</Button>\n <Button shape=\"border\">border</Button>\n </div>\n )\n }\n}\n","desc":" 基础按钮"},{"example":<Demo2 />,"title":" 事件按钮","code":"/**\n *\n * @title 事件按钮\n * @description 点击按钮触发事件\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n constructor(props) {\n super(props);\n }\n\n handleClick() {\n alert(\"谢谢你点我\")\n }\n\n render() {\n return (\n <Button colors=\"primary\" onClick={ this.handleClick }>事件按钮</Button>\n )\n }\n}\n","desc":" 点击按钮触发事件"},{"example":<Demo3 />,"title":" 不同颜色的按钮","code":"/**\n *\n * @title 不同颜色的按钮\n * @description 通过`colors`属性控制按钮颜色\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button colors=\"success\">success</Button>\n <Button colors=\"info\">info</Button>\n <Button colors=\"warning\">warning</Button>\n <Button colors=\"danger\">danger</Button>\n <div className=\"divider\"></div>\n <Button shape=\"border\" colors=\"success\">success</Button>\n <Button shape=\"border\" colors=\"warning\">info</Button>\n <Button shape=\"border\" colors=\"info\">warning</Button>\n <Button shape=\"border\" colors=\"danger\">danger</Button>\n </div>\n )\n }\n}\n","desc":" 通过`colors`属性控制按钮颜色"},{"example":<Demo4 />,"title":" 不同大小的按钮","code":"/**\n *\n * @title 不同大小的按钮\n * @description 通过`size`属性控制按钮大小\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button size=\"sm\" colors=\"primary\">小按钮</Button>\n <Button colors=\"primary\">默认</Button>\n <Button size=\"lg\" colors=\"primary\">大按钮</Button>\n <Button size=\"xg\" colors=\"primary\">巨大按钮</Button>\n </div>\n )\n }\n}\n","desc":" 通过`size`属性控制按钮大小"}]
var Demo1 = require("./demolist/Demo1");var Demo2 = require("./demolist/Demo2");var Demo3 = require("./demolist/Demo3");var Demo4 = require("./demolist/Demo4");var DemoArray = [{"example":<Demo1 />,"title":" 默认按钮","code":"/**\n *\n * @title 默认按钮\n * @description 基础按钮\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button>Default</Button>\n <Button disabled>disabled</Button>\n <Button shape=\"border\">border</Button>\n <Button shape=\"round\">round</Button>\n </div>\n )\n }\n}\n","desc":" 基础按钮"},{"example":<Demo2 />,"title":" 事件按钮","code":"/**\n *\n * @title 事件按钮\n * @description 点击按钮触发事件\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n constructor(props) {\n super(props);\n }\n\n handleClick() {\n alert(\"谢谢你点我\")\n }\n\n render() {\n return (\n <Button colors=\"primary\" onClick={ this.handleClick }>事件按钮</Button>\n )\n }\n}\n","desc":" 点击按钮触发事件"},{"example":<Demo3 />,"title":" 不同颜色的按钮","code":"/**\n *\n * @title 不同颜色的按钮\n * @description 通过`colors`属性控制按钮颜色\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button colors=\"success\">success</Button>\n <Button colors=\"info\">info</Button>\n <Button colors=\"warning\">warning</Button>\n <Button colors=\"danger\">danger</Button>\n <div className=\"divider\"></div>\n <Button shape=\"border\" colors=\"success\">success</Button>\n <Button shape=\"border\" colors=\"warning\">info</Button>\n <Button shape=\"border\" colors=\"info\">warning</Button>\n <Button shape=\"border\" colors=\"danger\">danger</Button>\n </div>\n )\n }\n}\n","desc":" 通过`colors`属性控制按钮颜色"},{"example":<Demo4 />,"title":" 不同大小的按钮","code":"/**\n *\n * @title 不同大小的按钮\n * @description 通过`size`属性控制按钮大小\n *\n */\n\nimport React, { Component } from 'react';\nimport Button from 'tinper-bee';\n\n\n render () {\n return (\n <div className=\"demoPadding\">\n <Button size=\"sm\" colors=\"primary\">小按钮</Button>\n <Button colors=\"primary\">默认</Button>\n <Button size=\"lg\" colors=\"primary\">大按钮</Button>\n <Button size=\"xg\" colors=\"primary\">巨大按钮</Button>\n </div>\n )\n }\n}\n","desc":" 通过`size`属性控制按钮大小"}]

@@ -17,0 +17,0 @@

{
"name": "bee-button",
"version": "0.2.7",
"version": "0.2.8",
"description": "tinper-bee button ui component for react",

@@ -39,2 +39,3 @@ "keywords": [

"classnames": "^2.2.5",
"babel-runtime": "^6.23.0",
"tinper-bee-core": "latest"

@@ -41,0 +42,0 @@ },

@@ -48,3 +48,3 @@ # button

|colors|颜色(primary/accent/success/info/warning/danger/default)|string|''|
|shape|形状(block/round/squared/floating/pillRight/pillLeft/icon)|string|''|
|shape|形状(block/border/round/squared/floating/pillRight/pillLeft/icon)|string|''|
|disabled|是否禁用(`disabled` 或 `true` `false`)|boolean|false|

@@ -51,0 +51,0 @@ |bordered|是否是边框型(`bordered` 或 `true` `false`)|boolean|false|

@@ -17,3 +17,3 @@ import React, { PropTypes, Component } from 'react';

*/
shape: PropTypes.oneOf(['block', 'round', 'squared', 'floating', 'pillRight', 'pillLeft', 'icon']),
shape: PropTypes.oneOf(['block', 'round','border', 'squared', 'floating', 'pillRight', 'pillLeft', 'icon']),

@@ -67,2 +67,3 @@ bordered: PropTypes.bool,

round: 'round',
border: 'border',
squared: 'squared',

@@ -98,2 +99,3 @@ floating: 'floating',

}
if (shapeMap[shape]) {

@@ -105,3 +107,3 @@ clsObj[`${clsPrefix}-${shapeMap[shape]}`] = true;

}
clsObj[`${clsPrefix}-border`] = bordered;
//clsObj[`${clsPrefix}-border`] = bordered;
let classes = classnames(clsPrefix, clsObj);

@@ -108,0 +110,0 @@ return (

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc