From d5a7a811d603254316712daff196edf2f20fea95 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 7 Feb 2019 11:21:53 +0100 Subject: [PATCH] <3 for the review --- docs/src/modules/components/AppDrawer.js | 2 +- docs/src/pages/layout/grid/grid.md | 8 ++++---- packages/material-ui/src/styles/createSpacing.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/modules/components/AppDrawer.js b/docs/src/modules/components/AppDrawer.js index b71303e953b9b4..ee1ce997b52623 100644 --- a/docs/src/modules/components/AppDrawer.js +++ b/docs/src/modules/components/AppDrawer.js @@ -19,7 +19,7 @@ const styles = theme => ({ }, title: { color: theme.palette.text.secondary, - marginBottom: 4, + marginBottom: theme.spacing(0.5), '&:hover': { color: theme.palette.primary.main, }, diff --git a/docs/src/pages/layout/grid/grid.md b/docs/src/pages/layout/grid/grid.md index 21b6a55f7da100..21d6d1e7a2ae37 100644 --- a/docs/src/pages/layout/grid/grid.md +++ b/docs/src/pages/layout/grid/grid.md @@ -23,11 +23,11 @@ The grid system is implemented with the `Grid` component: ## Spacing The responsive grid focuses on consistent spacing widths, rather than column width. -Material design margins and columns follow an **8px** square baseline grid. -The spacing property is an integer in the [0, 8] interval. +Material Design margins and columns follow an **8px** square baseline grid. +The spacing property is an integer between 0 and 10 inclusive. By default, the spacing between two grid items follows a linear function: `output(spacing) = spacing * 8px`, e.g. `spacing={2}` creates a 16px wide gap. -This output transformation function can be customized using the theme, exactly like [the system spacing](/system/spacing/#transformation). +This output transformation function can be customized [using the theme](/customization/themes/#spacing). {{"demo": "pages/layout/grid/SpacingGrid.js"}} @@ -96,7 +96,7 @@ There are 3 available workarounds: ```jsx
- + //...
diff --git a/packages/material-ui/src/styles/createSpacing.js b/packages/material-ui/src/styles/createSpacing.js index da35f8b45bae87..c343ed7873b1f2 100644 --- a/packages/material-ui/src/styles/createSpacing.js +++ b/packages/material-ui/src/styles/createSpacing.js @@ -34,7 +34,7 @@ export default function createSpacing(spacing) { [ 'Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', - 'You can replace theme.spacing.unit * 2 with theme.spacing(2).', + 'You can replace `theme.spacing.unit * 2` with `theme.spacing(2)`.', ].join('\n'), ); warnOnce = true;