From 3cd8415caa584facda8383dd5bd5cc101e3a0b48 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Wed, 16 Oct 2019 21:36:28 -0300 Subject: [PATCH] Fix typos in docs. --- docs/Fields.md | 2 +- docs/Inputs.md | 2 +- docs/List.md | 2 +- docs/Theming.md | 4 ++-- docs/Tutorial.md | 4 ++-- packages/ra-data-graphql/README.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/Fields.md b/docs/Fields.md index 75ba030d82f..8b5a8927d05 100644 --- a/docs/Fields.md +++ b/docs/Fields.md @@ -83,7 +83,7 @@ Ideal for embedded arrays of objects, e.g. `tags` and `backlinks` in the followi ```js { - id: 123 + id: 123, tags: [ { name: 'foo' }, { name: 'bar' } diff --git a/docs/Inputs.md b/docs/Inputs.md index 496b39fb0e0..72452610981 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -83,7 +83,7 @@ import { ArrayInput, SimpleFormIterator, DateInput, TextInput } from 'react-admi ```js { - id: 123 + id: 123, backlinks: [ { date: '2012-08-10T00:00:00.000Z', diff --git a/docs/List.md b/docs/List.md index 5c408eb2ff7..33bf2c560c1 100644 --- a/docs/List.md +++ b/docs/List.md @@ -873,7 +873,7 @@ const postRowClick = (id, basePath, record) => record.editable ? 'edit' : 'show' ```js import fetchUserRights from './fetchUserRights'; -const postRowClick = (id, basePath, record) => fetchUserRights().then(({ canEdit }) canEdit ? 'edit' : 'show'); +const postRowClick = (id, basePath, record) => fetchUserRights().then(({ canEdit }) => canEdit ? 'edit' : 'show'); ``` ### `expand` diff --git a/docs/Theming.md b/docs/Theming.md index 5f98d87b83f..01726cfab76 100644 --- a/docs/Theming.md +++ b/docs/Theming.md @@ -91,7 +91,7 @@ const VisitorFilter = props => { ); }; -// The List component supports the `root`, `header`, `actions` and `noResults` CSS classes. Here we override the `header` and `actions` classes +// The List component supports the `root`, `header`, `actions` and `noResults` CSS classes. Here we override the `header` and `actions` classes const useListStyles = makeStyles({ actions: { backgroundColor: 'Lavender', @@ -141,7 +141,7 @@ If you need more control over the HTML code, you can also create your own [Field ## Conditional Formatting -Sometimes you want the format to depend on the value. The following example shows how to create a new custom `NumberField` component which highlight its text in red when its value is 100 or higher. +Sometimes you want the format to depend on the value. The following example shows how to create a new custom `NumberField` component which highlight its text in red when its value is 100 or higher. {% raw %} ```jsx diff --git a/docs/Tutorial.md b/docs/Tutorial.md index 2af8a69287c..738bd9bcc17 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -871,7 +871,7 @@ export default { method: 'PUT', body: JSON.stringify(params.data), }).then(({ json }) => ({ data: json })); - } + }, create: (resource, params) => httpClient(`${apiUrl}/${resource}`, { @@ -895,7 +895,7 @@ export default { body: JSON.stringify(params.data), }).then(({ json }) => ({ data: json })); } -}); +}; ``` **Tip**: `fetchUtils.fetchJson()` is just a shortcut for `fetch().then(r => r.json())`, plus a control of the HTTP response code to throw an `HTTPError` in case of 4xx or 5xx response. Feel free to use `fetch()` directly if it doesn't suit your needs. diff --git a/packages/ra-data-graphql/README.md b/packages/ra-data-graphql/README.md index 0cc63035e4a..56c53c2e7ac 100644 --- a/packages/ra-data-graphql/README.md +++ b/packages/ra-data-graphql/README.md @@ -131,7 +131,7 @@ The introspection result is an object with 4 properties: - `types`: an array of all the GraphQL types discovered on your endpoint - `queries`: an array of all the GraphQL queries and mutations discovered on your endpoint -- `resources`: an array of objects with a `type` property, which is the GraphQL type for this resource, and a property for each react-admin fetch verb for which we found a matching query or mutation +- `resources`: an array of objects with a `type` property, which is the GraphQL type for this resource, and a property for each react-admin fetch verb for which we found a matching query or mutation - `schema`: the full schema For example: