Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binocarlos/passport-slim-ui
GUI components for passport-slim
https://github.com/binocarlos/passport-slim-ui
Last synced: 11 days ago
JSON representation
GUI components for passport-slim
- Host: GitHub
- URL: https://github.com/binocarlos/passport-slim-ui
- Owner: binocarlos
- Created: 2016-12-10T18:23:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-18T21:11:58.000Z (almost 8 years ago)
- Last Synced: 2024-09-22T01:37:54.929Z (about 2 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# passport-slim-ui
GUI components for [passport-slim](https://github.com/binocarlos/passport-slim)
## install
Install the module to your project:
```
$ npm install passport-slim-ui --save
```## Components
#### FormTabs
2 tabs that display the `LoginForm` and `RegisterForm` children
* page - the current page the user is viewing - {login,register}
* changePage(page) - run when the tab is changed
* loginForm - a React component for the login
* registerForm - a React component for the login
* loginTitle - the title for the login tab (default = 'Login')
* registerTitle - the title for the login tab (default = 'Register')
* styles - an object with styles that are used for the tabs
* wrapper - extra styles for both form wrappers
* registerwrapper - extra styles just for the register form
* loginwrapper - extra styles just for the login form#### LoginForm
A login form that points at a server url:
* url - the url to submit the login request to (e.g. /auth/v1/login)
* reducername - where you mounted the passport reducer (default = passport)
* error - the current error to display
* loading - are we currently in a loading transition
* primaryKey - the field to use as the login field {email,username} (default = email)
* data - the current biro data for the form
* meta - the current biro meta for the form
* onUpdate(data, meta) - run when the form data changes
* onSubmit(data, meta) - run when the form is submitted#### RegisterForm
A login form that points at a server url:
* url - the url to submit the login request to (e.g. /auth/v1/register)
* reducername - where you mounted the passport reducer (default = passport)
* error - the current error to display
* loading - are we currently in a loading transition
* includeEmail - should we ask for the users email address
* includeUsername - should we ask for the users username
* fields - extra biro schema fields
* data - the current biro data for the form
* meta - the current biro meta for the form
* onUpdate(data, meta) - run when the form data changes
* onSubmit(data, meta) - run when the form is submitted## license
MIT