
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
formik-material-ui
Advanced tools
[](https://travis-ci.org/stackworx/formik-material-ui) [](./LICENSE) [.
yarn add formik-material-ui
Then, import the components you need to use with Formik in the file you have your form component set up. The components avaliable are:
In this case we will use <TextField />
.
import { Formik, Field, Form } from 'formik';
+ import { TextField } from 'formik-material-ui';
Next, in your Formik form component, pass this <TextField />
component as the component
prop of the Formik <Field />
component:
<Field
name="email"
label="Email"
type="email"
+ component={TextField}
/>
Now you can add any of the Material UI props to the <Field />
component and <TextField />
will be able to accept them.
<Field
name="email"
label="Email"
type="email"
component={TextField}
+ margin="normal"
+ fullWidth
/>
name
, onChange
and value
are excluded from the typescript types. Note: if you are using js this does not prevent you from providing these props but here be dragons.onChange
import MuiTextField from '@material-ui/core/TextField';
import {fieldToTextField, TextField, TextFieldProps} from 'formik-material-ui';
...
const UppercasingTextField = (props: TextFieldProps) => (
<MuiTextField
{...fieldToTextField(props)}
onChange={event => {
const {value} = event.target;
props.form.setFieldValue(
props.field.name,
value ? value.toUpperCase() : ''
);
}}
/>
);
...
import {fieldToTextField} from 'formik-material-ui';
<Field name="name" render={(props) => (
<div>
<Comp1 {...fieldToTextField(props)} />
<Comp2 {...fieldToTextField(props)} />
...
</div>
)} />
yarn install
yarn storybook
yarn prepublishOnly
FAQs
  [![license](https://badgen.now.sh/badge/license/MIT
We found that formik-material-ui 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.