0.2.7 • Published 2 months ago

react-native-text-plus v0.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

react-native-text-plus 中文

A React Native component for text with gradient and text style attributes.

Installation

npm

npm install react-native-text-plus

yarn

yarn add react-native-text-plus

Usage

import { Text, TextContextProvider } from 'react-native-text-plus';

// ...

<TextContextProvider value={{
  fontSize: 14,
  fontFamily: '...',
  ... // same as Text style
}}>
  <View>
    <Text
      // text attributes
      fontWeight="bold"
      // ... as Text style and Text props
      style={{
        // only work for Text
      }}
      // text attributes end

      // gradient attributes
      colors={['#000', '#fff']} // for gradient
      start={{ x: 0, y: 0 }}
      //...  gradient attributes only work with colors, same as LinearGradient props
      // end
      // locations
      // useAngle
      // angleCenter
      // angle
      // gradient attributes end
    >Hello, World!</Text>
  </View>
</TextContextProvider>

// ...

Dependencies

"@react-native-masked-view/masked-view": "^0.3.0",

"react-native-linear-gradient": "^2.8.0"

// if you need lower version dependencies, please PR or issue

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.7

2 months ago

0.2.6

2 months ago

0.2.5

2 months ago

0.2.4

2 months ago

0.2.3

2 months ago

0.2.2

2 months ago

0.2.1

2 months ago

0.2.0

2 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago