1.0.10 • Published 3 years ago

native-x-text v1.0.10

Weekly downloads
59
License
MIT
Repository
github
Last release
3 years ago

native-x-text

semantic-release

This component adds space between to other components

Install

Yarn

yarn add native-x-text

NPM

npm install native-x-text

Usage

import { Text } from 'native-x-text'

function MyComponent() {
  return (
    <Stack>
      ...
      <Text fontSize='xx-large' bold>
        Header 1
      </Text>
      <Text fontSize='x-large' bold>
        Header 2
      </Text>
      <Text fontSize='large' bold>
        Header 3
      </Text>
      <Text>Body Text</Text>
      <Text fontSize='small'>Secondary Text</Text>
      <Text fontSize='x-small'>Caption</Text>
      <Text fontSize='xx-small'>Footer</Text>
      ...
    </Stack>
  )
}

Style Inheritance

<Text semiBold fontSize={'x-small'} textColor={COLOR.ERROR}>
  Hello, <Text bold>world!</Text>
</Text>

The text "world!" will inherit all properties of the parent "Hello,"

API

PropertyDefault ValueUsage
fill?: booleanfalseFill container or available space
bold?: booleanfalseShow text in bold
semiBold?: booleanfalseShow text in semi-bold (works only if bold is set to false)
thin?: booleanfalseShow text in think font (works only if bold and semiBold are set to false)
italic?: booleanfalseShow text in italic
alignLeft?: booleanfalseAlign left
alignCenter?: booleanfalseAlign center
alignRight?: booleanfalseAlign right
children?: stringContent
upperCase?: booleanfalseShow content in upper case
style?: TextStyleAdditional style
numberOfLines?: numberTotal number of lines to show
onPress?: () => voidCallback on tap

Automatic Release

Here is an example of the release type that will be done based on a commit messages:

Commit messageRelease type
fix: commentPatch Release
feat: commentMinor Feature Release
perf: commentMajor Feature Release
doc: commentNo Release
refactor: commentNo Release
chore: commentNo Release