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

nuke-button

Package Overview
Dependencies
Maintainers
4
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-button - npm Package Compare versions

Comparing version 2.2.17 to 2.2.18

readme.en.md

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

<a name="2.2.18"></a>
## [2.2.18](https://gitlab.alibaba-inc.com/nuke/button/compare/v2.2.17...v2.2.18) (2018-09-30)
### Bug Fixes
* update button demo ([3e75317](https://gitlab.alibaba-inc.com/nuke/button/commit/3e75317))
<a name="2.2.17"></a>

@@ -8,0 +20,0 @@ ## [2.2.17](https://gitlab.alibaba-inc.com/nuke/button/compare/v2.2.16...v2.2.17) (2018-09-26)

22

docs/basic.md

@@ -1,7 +0,17 @@

# Button Demo
# 包含各种类型的 Button
* order: 0
- title_en : different type of buttons
- order: 0
包含各种类型的 Button
---
```js
<NukePlayGround>
// primary
<Button type="primary">primary</Button>
// normal
<Button type="normal">normal</Button>
</NukePlayGround>
```
---

@@ -46,4 +56,3 @@

color: '#ffffff'
}}
>
}}>
primary

@@ -62,4 +71,3 @@ </Button>

'backgroundColor:active': '#770719'
}}
>
}}>
primary

@@ -66,0 +74,0 @@ </Button>

@@ -1,7 +0,17 @@

# Button Demo
# Button 支持 onPress , onLongpress 事件
- title_en : onPress and onLongpress events
- order: 1
Button 事件,包含 press , longpress
---
```js
<NukePlayGround>
// onPress
<Button onPress={(e) => {...}} type="primary">press </Button>
// onLongpress
<Button onLongpress={(e) => {...}} type="normal">longpress</Button>
</NukePlayGround>
```
---

@@ -16,3 +26,4 @@

import Page from 'nuke-page';
import { isWeb } from 'nuke-env';
import Env from 'nuke-env';
const { isWeb } = Env;

@@ -63,3 +74,2 @@ let App = class NukeDemoIndex extends Component {

<Button onPress={() => this.press()} type="primary">
{' '}
press 事件

@@ -66,0 +76,0 @@ </Button>

@@ -73,3 +73,2 @@ /** @jsx createElement */

if (this.props.disabled) return;
// stopTextPropagation in web
if (_nukeEnv.isWeb) {

@@ -123,3 +122,3 @@ e.stopPropagation();

_extends({ onPress: this.onPress, style: btnStyle }, others),
iconSrc ? (0, _rax.createElement)(_nukeIcon2.default, { size: 'xs', src: iconSrc, style: { marginRight: '10rem' } }) : null,
iconSrc ? (0, _rax.createElement)(_nukeIcon2.default, { size: 'xs', src: iconSrc, style: { marginRight: 10 } }) : null,
typeof children === 'string' ? (0, _rax.createElement)(

@@ -126,0 +125,0 @@ _nukeText2.default,

{
"name": "nuke-button",
"version": "2.2.17",
"version": "2.2.18",
"description": "按钮",

@@ -32,9 +32,9 @@ "main": "lib/index",

"dependencies": {
"nuke-core": "^2.2.17",
"nuke-env": "^2.2.17",
"nuke-icon": "^2.2.17",
"nuke-text": "^2.2.17",
"nuke-theme-provider": "^2.2.17",
"nuke-touchable": "^2.2.17",
"nuke-view": "^2.2.17"
"nuke-core": "^2.2.18",
"nuke-env": "^2.2.18",
"nuke-icon": "^2.2.18",
"nuke-text": "^2.2.18",
"nuke-theme-provider": "^2.2.18",
"nuke-touchable": "^2.2.18",
"nuke-view": "^2.2.18"
},

@@ -52,5 +52,5 @@ "engines": {

"devDependencies": {
"nuke-input": "^2.2.17",
"nuke-page": "^2.2.17",
"nuke-scroll-view": "^2.2.17"
"nuke-input": "^2.2.18",
"nuke-page": "^2.2.18",
"nuke-scroll-view": "^2.2.18"
},

@@ -61,3 +61,3 @@ "publishConfig": {

"license": "Apache",
"gitHead": "b43c293c8511d74cde3ba57166bf5596acf8a1dd"
"gitHead": "854b86a59c94718da62efdc7c397974442afd5f3"
}

@@ -25,15 +25,15 @@ # Button

属性 | 说明 | 类型 | 默认值
-----|-----|-----|------
type | 按钮的强调程度类型,可选:`normal(普通)`<br /> `primary`(重要) <br /> `secondary`(次要)<br /> (`dark`, `light`,仅`shape="ghost"`有效) | string | normal
shape | `ghost`(线框) , `warning`(警告) | string | normal
size | 设置按钮大小,可选: `small` `medium` `large` | string | medium
disabled | 设置按钮禁用状态 | boolean | false
onPress | `点击 press` 事件的 handler | function | 无
onLongpress | 长按事件的 handler( 仅 native 生效) | function | 无
icon | icon的url地址 | string | 无
loading | 是否加载中 | boolean | 无
rect | 是否直角 | boolean | false
block | 以block的方式展现 | boolean | false
fixedFont | 按钮文字是否固定字号 | boolean | false
| 属性 | 说明 | 类型 | 默认值 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------ |
| type | 按钮的强调程度类型,可选:`normal(普通)`<br /> `primary`(重要) <br /> `secondary`(次要)<br /> (`dark`, `light`,仅`shape="ghost"`有效) | string | normal |
| shape | `ghost`(线框) , `warning`(警告) | string | normal |
| size | 设置按钮大小,可选: `small` `medium` `large` | string | medium |
| disabled | 设置按钮禁用状态 | boolean | false |
| onPress | `点击 press` 事件的 handler | function | 无 |
| onLongpress | 长按事件的 handler( 仅 native 生效) | function | 无 |
| icon | icon的url地址 | string | 无 |
| loading | 是否加载中 | boolean | 无 |
| rect | 是否直角 | boolean | false |
| block | 以block的方式展现 | boolean | false |
| fixedFont | 按钮文字是否固定字号 | boolean | false |

@@ -44,6 +44,6 @@ **请注意:`onLongpress` 中,`p` 小写,且该事件仅 native 生效**

| 属性配置 | 说明 | 类型 | 默认值 |
| :------------- | :------------- | :------------- | :------------- |
| rect | 是否直角,所有子级button都会直角 | boolean | false |
| block | 以block的方式展现 | boolean | false |
| 属性配置 | 说明 | 类型 | 默认值 |
| :------- | :------------------------------- | :------ | :----- |
| rect | 是否直角,所有子级button都会直角 | boolean | false |
| block | 以block的方式展现 | boolean | false |

@@ -50,0 +50,0 @@

@@ -29,3 +29,2 @@ /** @jsx createElement */

if (this.props.disabled) return;
// stopTextPropagation in web
if (isWeb) {

@@ -76,3 +75,3 @@ e.stopPropagation();

<Touchable onPress={this.onPress} style={btnStyle} {...others}>
{iconSrc ? <Icon size="xs" src={iconSrc} style={{ marginRight: '10rem' }} /> : null}
{iconSrc ? <Icon size="xs" src={iconSrc} style={{ marginRight: 10 }} /> : null}
{typeof children === 'string' ? (

@@ -79,0 +78,0 @@ <Text style={textStyle} onClick={this.onTextPress}>

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