Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Commit

Permalink
[RFR] Use standard es6 in docs and example
Browse files Browse the repository at this point in the history
Fixes #996
  • Loading branch information
djhi committed Jan 26, 2018
1 parent 9b0541a commit 0979f65
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -76,7 +76,8 @@ The `<Resource>` component is a configuration component that allows to define su
// in posts.js
import React from 'react';
import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditButton, DisabledInput, TextInput, LongTextInput, DateInput } from 'admin-on-rest';
export PostIcon from 'material-ui/svg-icons/action/book';
import BookIcon from 'material-ui/svg-icons/action/book';
export const PostIcon = BookIcon;

export const PostList = (props) => (
<List {...props}>
Expand Down
1 change: 1 addition & 0 deletions docs/Admin.md
Expand Up @@ -434,6 +434,7 @@ const App = () => (
```

## `initialState`

The `initialState` prop lets you pass preloaded state to Redux. See the [Redux Documentation](http://redux.js.org/docs/api/createStore.html#createstorereducer-preloadedstate-enhancer) for more details.

## `history`
Expand Down
1 change: 0 additions & 1 deletion docs/Tutorial.md
Expand Up @@ -224,7 +224,6 @@ When displaying the posts list, the app now fetches related user records, and di

## Creation and Editing


An admin interface is about displaying remote data, but also about editing and creating. Admin-on-REST provides `<Create>` and `<Edit>` components for that purpose. Add them to the `posts` script:

```jsx
Expand Down
3 changes: 2 additions & 1 deletion docs/index.md
Expand Up @@ -78,7 +78,8 @@ The `<Resource>` component is a configuration component that allows to define su
// in posts.js
import React from 'react';
import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditButton, DisabledInput, TextInput, LongTextInput, DateInput } from 'admin-on-rest';
export PostIcon from 'material-ui/svg-icons/action/book';
import BookIcon from 'material-ui/svg-icons/action/book';
export const PostIcon = BookIcon;

export const PostList = (props) => (
<List {...props}>
Expand Down
4 changes: 3 additions & 1 deletion example/comments.js
Expand Up @@ -30,9 +30,11 @@ import Avatar from 'material-ui/Avatar';
import { Card, CardActions, CardHeader, CardText } from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar';

import ChevronLeft from 'material-ui/svg-icons/navigation/chevron-left';
import ChevronRight from 'material-ui/svg-icons/navigation/chevron-right';
export CommentIcon from 'material-ui/svg-icons/communication/chat-bubble';
import ChatBubbleIcon from 'material-ui/svg-icons/communication/chat-bubble';
export const CommentIcon = ChatBubbleIcon;

const CommentFilter = ({ ...props }) => (
<Filter {...props}>
Expand Down
7 changes: 5 additions & 2 deletions example/i18n/index.js
@@ -1,2 +1,5 @@
export en from './en';
export fr from './fr';
import enMessages from './en';
import frMessages from './fr';

export const en = enMessages;
export const fr = frMessages;
3 changes: 2 additions & 1 deletion example/posts.js
Expand Up @@ -47,7 +47,8 @@ import {
import RichTextInput from 'aor-rich-text-input';
import Chip from 'material-ui/Chip';

export PostIcon from 'material-ui/svg-icons/action/book';
import BookIcon from 'material-ui/svg-icons/action/book';
export const PostIcon = BookIcon;

const QuickFilter = translate(({ label, translate }) => (
<Chip style={{ marginBottom: 8 }}>{translate(label)}</Chip>
Expand Down
3 changes: 2 additions & 1 deletion example/users.js
Expand Up @@ -25,7 +25,8 @@ import {
translate,
} from 'admin-on-rest'; // eslint-disable-line import/no-unresolved

export UserIcon from 'material-ui/svg-icons/social/people';
import PeopleIcon from 'material-ui/svg-icons/social/people';
export const UserIcon = PeopleIcon;

const UserFilter = ({ ...props }) => (
<Filter {...props}>
Expand Down

0 comments on commit 0979f65

Please sign in to comment.