Wrap this component around another component to enable user interaction
yarn add native-x-image
npm install native-x-image
Note: This module uses react-native-fast-image internally. Make sure you have it configured.
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')} />
}
Property | Default Value | Usage |
---|---|---|
source: Source | Image to show | |
fill?: boolean | false | Fill width of the container |
width?: number | Width of the image | |
height?: number | Height of the image | |
resizeMode: ResizeMode | 'fill' | Valid values: contain, cover, stretch, center |
fallbackSource: Source | Image to show when the image is not available |
And all properties from:
Here is an example of the release type that will be done based on a commit messages:
Commit message | Release type |
---|---|
fix: [comment] | Patch Release |
feat: [comment] | Minor Feature Release |
perf: [comment] | Major Feature Release |
doc: [comment] | No Release |
refactor: [comment] | No Release |
chore: [comment] | No Release |