Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // LoginPage.js
- import React from 'react';
- import { Login, LoginForm } from 'react-admin';
- import { withStyles } from 'material-ui';
- const styles = ({
- main: { background: '#333' },
- avatar: {
- background: 'url(//cdn.example.com/background.jpg)',
- backgroundRepeat: 'no-repeat',
- backgroundSize: 'contain',
- height: 80,
- },
- icon: { display: 'none' },
- });
- const CustomLoginForm = withStyles({
- button: { background: '#F15922' },
- })(LoginForm);
- const CustomLoginPage = props => (
- <Login
- loginForm={<CustomLoginForm />}
- {...props}
- />
- );
- export default withStyles(styles)(CustomLoginPage);
- // App.js
- import { Admin } from 'react-admin';
- import LoginPage from './LoginPage';
- export default const App = () => (
- <Admin
- loginPage={LoginPage}
- {...props}
- >
- {resources}
- </Admin>
- );
Add Comment
Please, Sign In to add comment