@crave/farmblocks-form-wrapper
@crave/farmblocks-form-wrapper
npm i @crave/farmblocks-form-wrapper
@crave/farmblocks-form-wrapper

@crave/farmblocks-form-wrapper

React components for building web projects.

by CraveFood

1.8.11 (see all)License:MITTypeScript:Not Found
npm i @crave/farmblocks-form-wrapper
Readme

Farmblocks Form Wrapper

A wrapper container with options for cancel and save.

Installation

npm install @crave/farmblocks-form-wrapper

Usage

<FormWrapper
  onCancel={e => console.log(e)}
  onSave={e => console.log(e)}
  title="Title"
  extraContent={<div>Extra content</div>}
>
  <Input label="First Name" />
  <Input label="Last Name" />
</FormWrapper>

Output:

Properties

properytypedescriptionrequireddefault
titlestringThe text to be used as the title
cancelLabelstringThe text to be used in the Cancel linkCancel
saveLabelstringThe text to be used by the Save buttonSave
saveButtonPropsobjectThe props for Save button (check Button)
onCancelfunctionCallback of Cancel link clickYes
onSavefunctionCallback of Save button clickYes
childrennodeContents to be renderedYes
extraContentnodeContents to be rendered after Save button
loadingbooleanLoading state to be passed to Save button
idstringid attribute given to the wrapper and to the save and cancel actionables (with -save and -cancel sufixes)form-wrapper

License

MIT

VersionTagPublished
1.8.11
latest
2yrs ago
1.8.11-alpha-adjust-xsmall-font-size-value-6142.1.0
canary
2yrs ago
1.2.3-4209.1.8
4209.1
4yrs ago
1.2.3-4208.1.8
4208.1
4yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate