dynamic-form-react-native
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

react-native-dynamic-form

This package help you creating dynamic forms

Preview

Animation

Types fields

type typeFields =
  | 'title'
  | "text"
  | "signature"
  | "multiple_choice"
  | "single_choice"
  | "text_answer"
  | "date"
  | "date_time"
  | "time";

common type

type FieldCommonType = {
    label: string;
    name: string;
    onChange?: (newValue: string) => void;
    initialValue?: string;
    required?: boolean;
};
type TitleType = {
  type: "title";
  name: string;
  labelIsHtml?: boolean;
  label: string;
};

type SignatureFieldType = FieldCommonType & {
	type: "signature";
	multiple?: boolean;
	disabledInput?: boolean;
	initialValue?: SignatureValueType[];
	optionWhoSign?: string[];
};

type OptionMultipleChoiceType = {
	label: string;
	styleLabel?: TextStyle;
	style?: ViewStyle;
	disabled?: boolean;
	checked: boolean;
};

type MultipleChoiceType = FieldCommonType & {
	type: "multiple_choice";
	options: OptionMultipleChoiceType[];
};

Package Sidebar

Install

npm i dynamic-form-react-native

Weekly Downloads

4

Version

1.1.1

License

MIT

Unpacked Size

486 kB

Total Files

9

Last publish

Collaborators

  • mattheonieto