Thanks to visit codestin.com
Credit goes to github.com

Skip to content

shoetten/accounts-material-ui

 
 

Repository files navigation

React Accounts UI for using Material-UI

Fork of the apparently unmaintained Zetoff/accounts-material-ui, with react 16 and material-ui v1 support. Based on the work of yanickrochon/accounts-material-ui and ensemblebd/accounts-material-ui.

This might be buggy. Feel free to send me a pull request, if you encounter something strange..

React Accounts UI for using Material-UI

Based on and extends ensemblebd fork of std:accounts-ui

https://github.com/ensemblebd/accounts-ui

Installation

Create a packages folder in the root of your meteor project. Then clone this repository there. Meteor will use the local repo in favor of the atmosphere package provided by zetoff.

Dependencies

In addition to React this package also depends on material-ui. So make sure it is installed:

meteor npm install -S material-ui@next

Configuration

We support the standard configuration in the account-ui package. But have extended with some new options.

Example setup (Meteor 1.3)

meteor add accounts-password meteor npm install -S material-ui@next mkdir packages && cd packages git clone [email protected]:shoetten/accounts-material-ui.git

import React from 'react';
import { Accounts } from 'meteor/std:accounts-ui';

Accounts.ui.config({
  passwordSignupFields: 'NO_PASSWORD',
  loginPath: '/',
});

if (Meteor.isClient) {
  ReactDOM.render(<Accounts.ui.LoginForm />, document.body)
}

Example setup using FlowRouter (Meteor 1.3)

meteor add accounts-password meteor add zetoff:accounts-material-ui meteor npm install -S material-ui

import { FlowRouter } from 'meteor/kadira:flow-router-ssr';
import { Accounts } from 'meteor/std:accounts-ui';
import React from 'react';

Accounts.ui.config({
  passwordSignupFields: 'NO_PASSWORD',
  loginPath: '/login',
  onSignedInHook: () => FlowRouter.go('/'),
  onSignedOutHook: () => FlowRouter.go('/')
});

FlowRouter.route("/login", {
  action(params) {
    mount(MainLayout, {
      content: <Accounts.ui.LoginForm />
    });
  }
});

Credits

Originally made by Zetoff

About

Material-ui integration with std:accounts-ui, with React v16 & material-ui v1 support

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%