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

nuke-text

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-text - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

72

docs/basic.md
# Text Demo
- order: 0
* order: 0

@@ -9,4 +9,3 @@ 包含字号,颜色,字重,固定单位等

````js
```js
/** @jsx createElement */

@@ -28,4 +27,6 @@ import { createElement, Component, render } from 'rax';

const shortText1 = 'Different from a "web app"';
const shortText2 = 'Different from a "web app", "HTML5 app", or "hybrid app", you can use Weex to build a real mobile app. The code that you write is relatively simple, because you can build native applications just using HTML, CSS, Javascript.';
const LongText = 'Different from a "web app", "HTML5 app", or "hybrid app", you can use Weex to build a real mobile app. The code that you write is relatively simple, because you can build native applications just using HTML, CSS, Javascript. But underneath, the core of the application is Objective-C or Java. At the same time, Weex will provide a lot of native components or modules for developers to use.';
const shortText2 =
'Different from a "web app", "HTML5 app", or "hybrid app", you can use Weex to build a real mobile app. The code that you write is relatively simple, because you can build native applications just using HTML, CSS, Javascript.';
const LongText =
'Different from a "web app", "HTML5 app", or "hybrid app", you can use Weex to build a real mobile app. The code that you write is relatively simple, because you can build native applications just using HTML, CSS, Javascript. But underneath, the core of the application is Objective-C or Java. At the same time, Weex will provide a lot of native components or modules for developers to use.';

@@ -35,3 +36,2 @@ class TextDemo extends Component {

super();
}

@@ -41,2 +41,5 @@ render() {

<Page title="Text">
<Text>111</Text>
<Text>2222</Text>
<Text>3333</Text>
<Page.Intro main="Normal" />

@@ -63,3 +66,6 @@

})}
<Page.Intro main="固定字号,第一行固定,第二行自适应" sub="仅 native 生效" />
<Page.Intro
main="固定字号,第一行固定,第二行自适应"
sub="仅 native 生效"
/>
<View style={styles.textLine}>

@@ -70,4 +76,9 @@ <View style={styles.label}>

<View style={styles.result}>
<Text fixedFont={true} style={[styles.resultText, { fontSize: 28 }]}>28 号字</Text>
<Text style={[styles.resultText, { fontSize: 28 }]}>28 号字</Text>
<Text
fixedFont={true}
style={[styles.resultText, { fontSize: 28 }]}
>
28 号字
</Text>
<Text style={[styles.resultText, { fontSize: 28 }]}>28 号字</Text>
</View>

@@ -80,4 +91,9 @@ </View>

<View style={styles.result}>
<Text fixedFont={true} style={[styles.resultText, { fontSize: 32 }]}>32 号字</Text>
<Text style={[styles.resultText, { fontSize: 32 }]}>32 号字</Text>
<Text
fixedFont={true}
style={[styles.resultText, { fontSize: 32 }]}
>
32 号字
</Text>
<Text style={[styles.resultText, { fontSize: 32 }]}>32 号字</Text>
</View>

@@ -90,4 +106,9 @@ </View>

<View style={styles.result}>
<Text fixedFont={true} style={[styles.resultText, { fontSize:40 }]}>40 号字</Text>
<Text style={[styles.resultText, { fontSize:40 }]}>40 号字</Text>
<Text
fixedFont={true}
style={[styles.resultText, { fontSize: 40 }]}
>
40 号字
</Text>
<Text style={[styles.resultText, { fontSize: 40 }]}>40 号字</Text>
</View>

@@ -98,3 +119,7 @@ </View>

<View style={styles.block}>
<Text numberOfLines={1} style={[styles.blockText, { lineHeight: 48, height: 48 }]}>{LongText}
<Text
numberOfLines={1}
style={[styles.blockText, { lineHeight: 48, height: 48 }]}
>
{LongText}
</Text>

@@ -106,3 +131,6 @@ </View>

<View style={styles.block}>
<Text numberOfLines={3} style={[styles.blockText, { lineHeight: 48, height: 48 * 3 }]}>
<Text
numberOfLines={3}
style={[styles.blockText, { lineHeight: 48, height: 48 * 3 }]}
>
{LongText}

@@ -115,3 +143,6 @@ </Text>

<View style={[styles.block, { maxHeight: 48 * 2 }]}>
<Text numberOfLines={2} style={[styles.blockText, { lineHeight: 48, maxHeight: 48 * 2 }]}>
<Text
numberOfLines={2}
style={[styles.blockText, { lineHeight: 48, maxHeight: 48 * 2 }]}
>
{shortText1}

@@ -123,3 +154,6 @@ </Text>

<View style={[styles.block, { maxHeight: 48 * 2 }]}>
<Text numberOfLines={2} style={[styles.blockText, { lineHeight: 48, maxHeight: 48 * 2 }]}>
<Text
numberOfLines={2}
style={[styles.blockText, { lineHeight: 48, maxHeight: 48 * 2 }]}
>
{shortText2}

@@ -166,4 +200,2 @@ </Text>

render(<TextDemo />);
````
```
# Changelog
## 0.0.18 / 2018-03-03
* [[3865cd64](http://gitlab.alibaba-inc.com/nuke/text/commit/3865cd6482452faea3c6f2a1b3683738d949e1f2)] - `fix` fix some potential bug
## 0.0.17 / 2018-03-03

@@ -5,0 +9,0 @@

@@ -47,4 +47,6 @@ /** @jsx createElement */

var _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this));
var _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, props));
_this.fixedFont = false;
_this.optimizeLineHeight = false;
if (context && context.commonConfigs) {

@@ -51,0 +53,0 @@ _this.fixedFont = context.commonConfigs && context.commonConfigs.fixedFont;

{
"name": "nuke-text",
"version": "0.0.17",
"version": "0.0.18",
"description": "文本",

@@ -5,0 +5,0 @@ "main": "lib/index",

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