npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-dynamic-forms

v1.0.39

Published

#### Wrap the root component of your App into ApplicationProvider component. In your App.js:

Downloads

13

Readme

DynamicForms is powered by React Native UI Kitten and Formik https://akveo.github.io/react-native-ui-kitten/docs/getting-started/what-is-ui-kitten#what-is-ui-kitten

https://jaredpalmer.com/formik

DOCS STILL UNDER CONSTRUCTION............

todos...

convert all components to styled components...

Follow instructions on their website to set up your application with UI Kitten.

Configure Application Root

Wrap the root component of your App into ApplicationProvider component. In your App.js:


import {
  ApplicationProvider,
  IconRegistry,
} from '@ui-kitten/components';
import {mapping, light} from '@eva-design/eva';
import {EvaIconsPack} from '@ui-kitten/eva-icons';

const App = () => (
    <ApplicationProvider
      mapping={mapping}
      theme={light}
    >
      <IconRegistry icons={EvaIconsPack} />
        {/* YOUR CODE */}
    </ApplicationProvider>
);

export default App;

Usage

import DynamicForm from '..';
import * as yup from 'yup';

const loginForm = {
  email: {
    type: 'textField',
    placeholder: 'email',
    title: 'Email',
    initialValue: '',
    keyboardType: 'email-address',
  },
  password: {
    type: 'textField',
    placeholder: 'password',
    title: 'Password',
    initialValue: '',
    secure: true,
  },

  checkbox: {
    type: 'checkboxField',
    placeholder: 'check',
    title: 'I agree with Terms & Conditions',
    initialValue: false,
    style: {},
    textStyle: {},
  },
};

const schema = yup.object({
  email: yup
    .string()
    .email()
    .required(),
  password: yup.string().required(),
  checkbox: yup
    .bool()
    .oneOf([true], 'You must agree with terms and conditions'),
});

const Login = ({}: LoginProps) => {
  return (
    <SafeAreaView style={{flex: 1}}>
      <DynamicForm
        form={loginForm}
        schema={schema}
        onSubmit={(values, fomikProps) => {
          console.log('VALUES', values);
          login(values.email, values.password, values.checkbox).then(() => {

          }).catch(e => {
            fomikProps.setError()
          })
        }}
        submitButtonText="Login"
      />
    </SafeAreaView>
  );
};

export default Login;

TextField

    referral_description: {
      type: "textField",
      multiline: true,
      placeholder: "",
      title: "Referral Description"
    }

Common Props

| Prop | Description | Default | Required | | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | type | Type of field to render, valid values: 'textField', 'selectField', 'checkboxField', 'toggleField', 'radioField', 'datePickerField', 'avatarField', 'tagsInputField', 'pickerField', 'multiSelectPickerField', 'autoCompleteAddressField', 'buttonGroupField', 'fieldSection' | None | Yes | | placeholder | Placeholder string to display. Only valid in textFields, selectField, pickerField, ... | None | No | | title | Title to display above the field. | None | No | | initialValue | Initial Value of the field. | None | Yes |

Text Field Props

| Prop | Description | Default | Required | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | multiline | Make your textfield multiline. | False | No | | secure | If you want your textfield to be of SecureEntry type | False | No | | ...otherTextInputProps | Any additional Input props will be passed down. refer to this link: https://akveo.github.io/react-native-ui-kitten/docs/components/input/overview#input | None | No |

Select Field Props

| Prop | Description | Default | Required | | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | options | Options of the select field. ex: [{text: "Option 1"}, {text: "Option 2"}]. | None | Yes | | ...otherSelectProps | Any additional Select props will be passed down. refer to this link: https://akveo.github.io/react-native-ui-kitten/docs/components/select/api#select | None | No |

Toggle Field Props

| Prop | Description | Default | Required | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | | ...otherToggleProps | Any additional Toggle props will be passed down. refer to this link: https://akveo.github.io/react-native-ui-kitten/docs/components/toggle/overview#toggle | None | No |

Tags Input Field Props

| Prop | Description | Default | Required | | ----------------------- | ------------------------------------ | ------- | -------- | | tagContainerStyle | Style Object for Container. | None | No | | tagIconStyle | Style Object for Icon | None | No | | tagTextStyle | Style Object for Text | None | No | | renderCloseIcon | function to render Close Icon on tag | None | No |