Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-image-picker-form
Advanced tools
Readme
A React Native component factory to use with tcomb-form-native
library. Currently using react-native-image-crop-picker
to provide image selection.
$ yarn add react-native-image-picker-form
After that, follow the instructions on: https://github.com/ivpusic/react-native-image-crop-picker#install
When configuring your tcomb-form-native
form, use the factory
option to set as SelectImageFactory
.
You can change the text displayed on ActionSheet or BottomSheet setting a options value or change the title with title option on config
.
Default locale is en-US
:
import React from 'react-native'
import t from 'tcomb-form-native'
import ImageFactory from 'react-native-image-picker-form'
const Form = t.form.Form
const DocumentFormStruct = t.struct({
image: t.String
})
type Props = {}
type State = {
value: Object,
options: Object
}
class App extends React.Component<Props, State> {
constructor(props) {
super(props)
this.state = {
value: {},
options: {
fields: {
image: {
config: {
title: 'Select image',
options: ['Open camera', 'Select from gallery', 'Cancel']
// Used on Android to style BottomSheet
style: {
titleFontFamily: 'Roboto'
}
},
error: 'No image provided',
factory: ImageFactory
}
}
}
}
}
render() {
return (
<Form
ref={(ref: any) => {
this.form = ref
}}
type={DocumentFormStruct}
value={this.state.value}
options={this.state.options}
/>
)
}
}
MIT License
Copyright (c) 2018 InterfaceKit
Antonio Moreno Valls <amoreno at apsl.net>
Built with 💛 by APSL.
FAQs
A React Native component factory to use with tcomb-form-native. Currently using react-native-image-crop-picker to provide image selection.
The npm package react-native-image-picker-form receives a total of 1 weekly downloads. As such, react-native-image-picker-form popularity was classified as not popular.
We found that react-native-image-picker-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.