<PasswordField />
component for React + Material-UI.
$ npm install password-field --save
- React 16.x
- Material-UI
import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import PasswordField from 'password-field'
class MyComponent extends Component {
render() {
return(
<MuiThemeProvider>
<PasswordField
id="password"
hintText="Password"
fullWidth={ true }
iconColor="#ffffff"
/>
</MuiThemeProvider>
);
}
}
All properties of TextField will be supported.
And also, PasswordField
has following custom properties.
- iconColor - The color of icon to toggle visibility. It will be passed to SVG Icon as the
color
property. - iconStyle - The style of icon to toggle visibility. It will be passed to SVG Icon as the
style
property.
MIT