1.0.10 • Published 3 years ago

native-x-image v1.0.10

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

native-x-image

semantic-release

Wrap this component around another component to enable user interaction

Install

Yarn

yarn add native-x-image

NPM

npm install native-x-image

Note: This module uses react-native-fast-image internally. Make sure you have it configured.

See: react-native-fast-image

Usage

import { Image } from 'native-x-image'

function MyComponent() {
  const onTap = () => {
    // handle action
  }
  return <Image source={{ uri: 'https://' }} />
}

// or with local

function MyComponent({ user }: { user: User }) {
  const onTapUser = (user: User) => {
    // handle action
  }
  return <Image source={require('./local-image.png')} />
}

API

PropertyDefault ValueUsage
source: SourceImage to show
fill?: booleanfalseFill width of the container
width?: numberWidth of the image
height?: numberHeight of the image
resizeMode: ResizeMode'fill'Valid values: contain, cover, stretch, center
fallbackSource: SourceImage to show when the image is not available

And all properties from:

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
1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago