From 945abb450450a43a7662054d872a92374f9d53c3 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Mon, 5 Oct 2020 12:21:30 +0200 Subject: [PATCH] [core] Batch small changes (#403) --- docs/babel.config.js | 1 - docs/package.json | 1 - docs/src/pages.js | 64 +++++++++---------- .../data-grid/rendering/RenderCellGrid.js | 15 +++-- .../data-grid/rendering/RenderCellGrid.tsx | 15 +++-- .../data-grid/rendering/rendering.md | 13 ++-- yarn.lock | 5 -- 7 files changed, 63 insertions(+), 51 deletions(-) diff --git a/docs/babel.config.js b/docs/babel.config.js index 9edf7b1d1932a..f715a785cc406 100644 --- a/docs/babel.config.js +++ b/docs/babel.config.js @@ -61,7 +61,6 @@ module.exports = { production: { plugins: [ '@babel/plugin-transform-react-constant-elements', - 'babel-plugin-transform-dev-warning', ['babel-plugin-react-remove-properties', { properties: ['data-mui-test'] }], ['babel-plugin-transform-react-remove-prop-types', { mode: 'remove' }], ], diff --git a/docs/package.json b/docs/package.json index 636f77924193f..e6169eff3777a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -50,7 +50,6 @@ "babel-plugin-optimize-clsx": "^2.4.1", "babel-plugin-preval": "^2.0.0", "babel-plugin-react-remove-properties": "^0.3.0", - "babel-plugin-transform-dev-warning": "^0.1.1", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "clean-css": "^4.1.11", "clipboard-copy": "^3.0.0", diff --git a/docs/src/pages.js b/docs/src/pages.js index a726fbab7e8b6..be31808446556 100644 --- a/docs/src/pages.js +++ b/docs/src/pages.js @@ -95,38 +95,6 @@ const pages = [ { pathname: '/components/typography' }, ], }, - { - pathname: '/components', - subheader: '/components/utils', - children: [ - { pathname: '/components/click-away-listener' }, - { pathname: '/components/css-baseline', title: 'CSS Baseline' }, - { pathname: '/components/modal' }, - { pathname: '/components/no-ssr', title: 'No SSR' }, - { pathname: '/components/popover' }, - { pathname: '/components/popper' }, - { pathname: '/components/portal' }, - { pathname: '/components/textarea-autosize' }, - { pathname: '/components/transitions' }, - { pathname: '/components/use-media-query', title: 'useMediaQuery' }, - ], - }, - { - pathname: '/components', - subheader: '/components/lab', - children: [ - { pathname: '/components/about-the-lab' }, - { pathname: '/components/alert' }, - { pathname: '/components/autocomplete' }, - { pathname: '/components/pagination' }, - { pathname: '/components/rating' }, - { pathname: '/components/skeleton' }, - { pathname: '/components/speed-dial' }, - { pathname: '/components/timeline' }, - { pathname: '/components/toggle-button' }, - { pathname: '/components/tree-view' }, - ], - }, { pathname: '/components', subheader: '/components/data-grid', @@ -169,6 +137,38 @@ const pages = [ { pathname: '/components/data-grid/accessibility' }, ], }, + { + pathname: '/components', + subheader: '/components/utils', + children: [ + { pathname: '/components/click-away-listener' }, + { pathname: '/components/css-baseline', title: 'CSS Baseline' }, + { pathname: '/components/modal' }, + { pathname: '/components/no-ssr', title: 'No SSR' }, + { pathname: '/components/popover' }, + { pathname: '/components/popper' }, + { pathname: '/components/portal' }, + { pathname: '/components/textarea-autosize' }, + { pathname: '/components/transitions' }, + { pathname: '/components/use-media-query', title: 'useMediaQuery' }, + ], + }, + { + pathname: '/components', + subheader: '/components/lab', + children: [ + { pathname: '/components/about-the-lab' }, + { pathname: '/components/alert' }, + { pathname: '/components/autocomplete' }, + { pathname: '/components/pagination' }, + { pathname: '/components/rating' }, + { pathname: '/components/skeleton' }, + { pathname: '/components/speed-dial' }, + { pathname: '/components/timeline' }, + { pathname: '/components/toggle-button' }, + { pathname: '/components/tree-view' }, + ], + }, ], }, { diff --git a/docs/src/pages/components/data-grid/rendering/RenderCellGrid.js b/docs/src/pages/components/data-grid/rendering/RenderCellGrid.js index 2b60ce56b392f..32ed01d22cdd1 100644 --- a/docs/src/pages/components/data-grid/rendering/RenderCellGrid.js +++ b/docs/src/pages/components/data-grid/rendering/RenderCellGrid.js @@ -1,16 +1,23 @@ import * as React from 'react'; +import Button from '@material-ui/core/Button'; import { DataGrid } from '@material-ui/data-grid'; const columns = [ { field: 'date', headerName: 'Year', + width: 150, renderCell: (params) => ( - {params.value.getFullYear()}{' '} - - 🎂 - + {params.value.getFullYear()} + ), }, diff --git a/docs/src/pages/components/data-grid/rendering/RenderCellGrid.tsx b/docs/src/pages/components/data-grid/rendering/RenderCellGrid.tsx index 85822528d101c..f86fb12a04f38 100644 --- a/docs/src/pages/components/data-grid/rendering/RenderCellGrid.tsx +++ b/docs/src/pages/components/data-grid/rendering/RenderCellGrid.tsx @@ -1,16 +1,23 @@ import * as React from 'react'; +import Button from '@material-ui/core/Button'; import { DataGrid, ColDef, ValueFormatterParams } from '@material-ui/data-grid'; const columns: ColDef[] = [ { field: 'date', headerName: 'Year', + width: 150, renderCell: (params: ValueFormatterParams) => ( - {(params.value as Date).getFullYear()}{' '} - - 🎂 - + {(params.value as Date).getFullYear()} + ), }, diff --git a/docs/src/pages/components/data-grid/rendering/rendering.md b/docs/src/pages/components/data-grid/rendering/rendering.md index 65af84e4cbaf3..7757480557346 100644 --- a/docs/src/pages/components/data-grid/rendering/rendering.md +++ b/docs/src/pages/components/data-grid/rendering/rendering.md @@ -84,10 +84,15 @@ const columns: ColDef[] = [ headerName: 'Year', renderCell: (params: ValueFormatterParams) => ( - {(params.value as Date).getFullYear()}{' '} - - 🎂 - + {(params.value as Date).getFullYear()} + ), }, diff --git a/yarn.lock b/yarn.lock index 22687e14b0cd2..7b805302a946d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6527,11 +6527,6 @@ babel-plugin-transform-define@2.0.0: lodash "^4.17.11" traverse "0.6.6" -babel-plugin-transform-dev-warning@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-dev-warning/-/babel-plugin-transform-dev-warning-0.1.1.tgz#9e3cca7c22b27a667486fda11bbce29c0c59e76e" - integrity sha512-3n6ptKAU1KqhfzmrQuI4Blyvt0T6vHCeaOpULKjAbU+5+JSePSeVorB+24SHe58/zxXsP4sm1q3crsDFD+UHYQ== - babel-plugin-transform-inline-consecutive-adds@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz#323d47a3ea63a83a7ac3c811ae8e6941faf2b0d1"