From b29c1077e572ed6b0397c03c4c96820583686f90 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Wed, 21 Feb 2018 23:54:30 +0100 Subject: [PATCH] [docs] Improve readability --- docs/src/modules/components/AppDrawer.js | 10 ++-- .../modules/components/AppDrawerNavItem.js | 32 ++++------- .../src/modules/components/MarkdownElement.js | 21 ++++++- docs/src/modules/utils/generateMarkdown.js | 10 +++- pages/api/app-bar.md | 8 +-- pages/api/avatar.md | 16 +++--- pages/api/backdrop.md | 8 +-- pages/api/badge.md | 10 ++-- pages/api/bottom-navigation-action.md | 10 ++-- pages/api/bottom-navigation.md | 10 ++-- pages/api/button-base.md | 20 +++---- pages/api/button.md | 24 ++++---- pages/api/card-actions.md | 6 +- pages/api/card-content.md | 4 +- pages/api/card-header.md | 12 ++-- pages/api/card-media.md | 8 +-- pages/api/card.md | 2 +- pages/api/checkbox.md | 32 +++++------ pages/api/chip.md | 12 ++-- pages/api/circular-progress.md | 16 +++--- pages/api/click-away-listener.md | 4 +- pages/api/collapse.md | 12 ++-- pages/api/dialog-actions.md | 4 +- pages/api/dialog-content-text.md | 4 +- pages/api/dialog-content.md | 4 +- pages/api/dialog-title.md | 6 +- pages/api/dialog.md | 40 ++++++------- pages/api/divider.md | 10 ++-- pages/api/drawer.md | 22 ++++---- pages/api/expansion-panel-actions.md | 4 +- pages/api/expansion-panel-details.md | 4 +- pages/api/expansion-panel-summary.md | 6 +- pages/api/expansion-panel.md | 14 ++--- pages/api/fade.md | 6 +- pages/api/form-control-label.md | 18 +++--- pages/api/form-control.md | 16 +++--- pages/api/form-group.md | 6 +- pages/api/form-helper-text.md | 12 ++-- pages/api/form-label.md | 14 ++--- pages/api/grid-list-tile-bar.md | 12 ++-- pages/api/grid-list-tile.md | 10 ++-- pages/api/grid-list.md | 12 ++-- pages/api/grid.md | 36 ++++++------ pages/api/grow.md | 6 +- pages/api/hidden.md | 28 +++++----- pages/api/icon-button.md | 10 ++-- pages/api/icon.md | 8 +-- pages/api/input-adornment.md | 10 ++-- pages/api/input-label.md | 20 +++---- pages/api/input.md | 52 ++++++++--------- pages/api/linear-progress.md | 10 ++-- pages/api/list-item-avatar.md | 4 +- pages/api/list-item-icon.md | 4 +- pages/api/list-item-secondary-action.md | 4 +- pages/api/list-item-text.md | 10 ++-- pages/api/list-item.md | 18 +++--- pages/api/list-subheader.md | 12 ++-- pages/api/list.md | 12 ++-- pages/api/menu-item.md | 8 +-- pages/api/menu-list.md | 2 +- pages/api/menu.md | 28 +++++----- pages/api/mobile-stepper.md | 14 ++--- pages/api/modal.md | 36 ++++++------ pages/api/mui-theme-provider.md | 8 +-- pages/api/paper.md | 10 ++-- pages/api/popover.md | 46 +++++++-------- pages/api/portal.md | 6 +- pages/api/radio-group.md | 8 +-- pages/api/radio.md | 28 +++++----- pages/api/reboot.md | 2 +- pages/api/select.md | 30 +++++----- pages/api/slide.md | 8 +-- pages/api/snackbar-content.md | 6 +- pages/api/snackbar.md | 40 ++++++------- pages/api/step-button.md | 6 +- pages/api/step-content.md | 6 +- pages/api/step-icon.md | 8 +-- pages/api/step-label.md | 10 ++-- pages/api/step.md | 8 +-- pages/api/stepper.md | 14 ++--- pages/api/svg-icon.md | 14 ++--- pages/api/switch.md | 28 +++++----- pages/api/tab.md | 10 ++-- pages/api/table-body.md | 4 +- pages/api/table-cell.md | 16 +++--- pages/api/table-footer.md | 4 +- pages/api/table-head.md | 4 +- pages/api/table-pagination.md | 26 ++++----- pages/api/table-row.md | 10 ++-- pages/api/table-sort-label.md | 8 +-- pages/api/table.md | 6 +- pages/api/tabs.md | 28 +++++----- pages/api/text-field.md | 56 +++++++++---------- pages/api/toolbar.md | 6 +- pages/api/tooltip.md | 28 +++++----- pages/api/typography.md | 20 +++---- pages/api/zoom.md | 6 +- pages/lab/api/speed-dial-action.md | 10 ++-- pages/lab/api/speed-dial-icon.md | 6 +- pages/lab/api/speed-dial.md | 22 ++++---- src/Grid/Grid.js | 2 +- 101 files changed, 708 insertions(+), 693 deletions(-) diff --git a/docs/src/modules/components/AppDrawer.js b/docs/src/modules/components/AppDrawer.js index cecd244a523f44..716faf1ef2bbf8 100644 --- a/docs/src/modules/components/AppDrawer.js +++ b/docs/src/modules/components/AppDrawer.js @@ -3,7 +3,6 @@ import classNames from 'classnames'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import List from 'material-ui/List'; -import Toolbar from 'material-ui/Toolbar'; import Drawer from 'material-ui/Drawer'; import Typography from 'material-ui/Typography'; import Divider from 'material-ui/Divider'; @@ -29,6 +28,9 @@ const styles = theme => ({ display: 'flex', }, toolbar: { + ...theme.mixins.toolbar, + paddingLeft: theme.spacing.unit * 3, + display: 'flex', flexGrow: 1, flexDirection: 'column', alignItems: 'flex-start', @@ -88,7 +90,7 @@ function AppDrawer(props, context) { const drawer = (
- +
Material-UI @@ -102,9 +104,9 @@ function AppDrawer(props, context) { {`v${process.env.MATERIAL_UI_VERSION}`} ) : null} - - +
+ {renderNavItems({ props, pages: context.pages, activePage: context.activePage, depth: 0 })}
); diff --git a/docs/src/modules/components/AppDrawerNavItem.js b/docs/src/modules/components/AppDrawerNavItem.js index b4e57bda3834bd..d85adf2d81514b 100644 --- a/docs/src/modules/components/AppDrawerNavItem.js +++ b/docs/src/modules/components/AppDrawerNavItem.js @@ -1,40 +1,32 @@ import React from 'react'; import PropTypes from 'prop-types'; import Link from 'docs/src/modules/components/Link'; -import classNames from 'classnames'; import { withStyles } from 'material-ui/styles'; import { ListItem } from 'material-ui/List'; import Button from 'material-ui/Button'; import Collapse from 'material-ui/transitions/Collapse'; const styles = theme => ({ - button: theme.mixins.gutters({ - borderRadius: 0, - justifyContent: 'flex-start', - textTransform: 'none', - width: '100%', - transition: theme.transitions.create('background-color', { - duration: theme.transitions.duration.shortest, - }), - '&:hover': { - textDecoration: 'none', - }, - }), item: { - ...theme.typography.body2, display: 'block', paddingTop: 0, paddingBottom: 0, }, - leaf: { - fontWeight: theme.typography.fontWeightRegular, + itemLeaf: { display: 'flex', paddingTop: 0, paddingBottom: 0, }, - leafButton: { + button: { + justifyContent: 'flex-start', + textTransform: 'none', + width: '100%', + }, + buttonLeaf: { + justifyContent: 'flex-start', + textTransform: 'none', + width: '100%', color: theme.palette.text.secondary, - fontSize: theme.typography.pxToRem(13), }, active: { color: theme.palette.text.primary, @@ -74,12 +66,12 @@ class AppDrawerNavItem extends React.Component { if (href) { return ( - +