Troila Mobile Ui

Troila Mobile Ui

  • Docs
  • API
  • Help
  • Blog

›Components

Troila Mobile Ui

  • Getting Started

Components

  • Text
  • ListView
  • List
  • TextInput
  • InputItem
  • Step
  • SpringAnimatedView

卓朗云桌面-内部组件

  • request (请求类)
  • BackgroundButton
  • ExtendsBackButton
  • HeaderTitleButton
  • HeaderImageButton
  • 注意事项
  • 不同平台和设备的入口

Text

基于react-native的Text的封装

规则

  • 统一添加了allowFontScaling用来处理系统字体大小

Example

iOS Android

Code

import React, { Component } from 'react';
import { Text } from 'troila-mobile-ui';

class TextInANest extends Component {
  render() {
    return (
      <Text style={styles.baseText}>
        <Text style={styles.titleText} onPress={this.onPressTitle}>
          {this.state.titleText}{'\n'}{'\n'}
        </Text>
        <Text numberOfLines={5}>
          {this.state.bodyText}
        </Text>
      </Text>
    );
  }
}

const styles = StyleSheet.create({
  baseText: {
    fontFamily: 'Cochin',
  },
  titleText: {
    fontSize: 20,
    fontWeight: 'bold',
  },
})

Props

属性说明类型默认值
allowFontScaling控制字体是否要根据系统的“字体大小”辅助选项来进行缩放Booleantrue

更多 react-native Text 属性请参考 react-native Text (http://facebook.github.io/react-native/docs/text.html)

← Troila Mobile Ui of React-NativeListView →
  • 规则
  • Example
  • Code
  • Props
Troila Mobile Ui
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Facebook Open Source
Copyright © 2018 Your Name or Your Company Name