Skip to content

Commit

Permalink
[core] Batch small changes (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 5, 2020
1 parent 1a38eb5 commit 945abb4
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 51 deletions.
1 change: 0 additions & 1 deletion docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }],
],
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
64 changes: 32 additions & 32 deletions docs/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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' },
],
},
],
},
{
Expand Down
15 changes: 11 additions & 4 deletions docs/src/pages/components/data-grid/rendering/RenderCellGrid.js
Original file line number Diff line number Diff line change
@@ -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) => (
<strong>
{params.value.getFullYear()}{' '}
<span role="img" aria-label="birthday">
🎂
</span>
{params.value.getFullYear()}
<Button
variant="contained"
color="primary"
size="small"
style={{ marginLeft: 16 }}
>
Open
</Button>
</strong>
),
},
Expand Down
15 changes: 11 additions & 4 deletions docs/src/pages/components/data-grid/rendering/RenderCellGrid.tsx
Original file line number Diff line number Diff line change
@@ -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) => (
<strong>
{(params.value as Date).getFullYear()}{' '}
<span role="img" aria-label="birthday">
🎂
</span>
{(params.value as Date).getFullYear()}
<Button
variant="contained"
color="primary"
size="small"
style={{ marginLeft: 16 }}
>
Open
</Button>
</strong>
),
},
Expand Down
13 changes: 9 additions & 4 deletions docs/src/pages/components/data-grid/rendering/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ const columns: ColDef[] = [
headerName: 'Year',
renderCell: (params: ValueFormatterParams) => (
<strong>
{(params.value as Date).getFullYear()}{' '}
<span role="img" aria-label="birthday">
🎂
</span>
{(params.value as Date).getFullYear()}
<Button
variant="contained"
color="primary"
size="small"
style={{ marginLeft: 16 }}
>
Open
</Button>
</strong>
),
},
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 945abb4

Please sign in to comment.