Skip to content

Commit a910170

Browse files
Chore: React 18
Signed-off-by: saurabhraghuvanshii <saurabhsraghuvanshi@gmail.com>
1 parent 987f35a commit a910170

File tree

47 files changed

+1072
-594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1072
-594
lines changed

.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,15 @@
3636
[
3737
"@babel/plugin-proposal-class-properties"
3838
],
39+
[
40+
"@babel/plugin-proposal-nullish-coalescing-operator"
41+
],
3942
[
4043
"@babel/plugin-proposal-object-rest-spread"
4144
],
45+
[
46+
"@babel/plugin-proposal-optional-chaining"
47+
],
4248
[
4349
"@babel/plugin-transform-async-to-generator"
4450
],

examples/Router/ExamplesGrid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {Card, CardContent, Grid, Typography} from "@mui/material";
33
import React from "react";
44
import examples from "../examples";
55
import { withStyles } from "tss-react/mui";
6-
import TextField from '@mui/material/TextField';
6+
import { TextField } from '@mui/material';
77

88
const styles = {
99
container: {

examples/Router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HashRouter as Router, Route, Switch, withRouter } from 'react-router-do
44
import { withStyles } from 'tss-react/mui';
55
import ExamplesGrid from './ExamplesGrid';
66
import examples from '../examples';
7-
import Button from '@mui/material/Button';
7+
import { Button } from '@mui/material';
88
import { createTheme, ThemeProvider } from '@mui/material/styles';
99

1010
const styles = {

examples/array-value-columns/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React, { useState } from 'react';
22
import MUIDataTable from '../../src';
3-
import Chip from '@mui/material/Chip';
4-
import FormControlLabel from '@mui/material/FormControlLabel';
5-
import Switch from '@mui/material/Switch';
3+
import { Chip, FormControlLabel, Switch } from '@mui/material';
64

75
function Example() {
86
// const allTags = ['leave-message', 'frequently-busy', 'nice', 'grumpy', 'in-person', 'preferred', 'second-choice'];

examples/component/cities.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/component/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
3-
import FormControlLabel from '@mui/material/FormControlLabel';
4-
import TextField from '@mui/material/TextField';
5-
import Switch from '@mui/material/Switch';
3+
import { FormControlLabel, TextField, Switch } from '@mui/material';
64
import MUIDataTable from "../../src/";
75
import Cities from "./cities";
86

examples/csv-export/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Button from '@mui/material/Button';
1+
import { Button } from '@mui/material';
22
import React from 'react';
33
import ReactDOM from 'react-dom';
44
import MUIDataTable from '../../src/';

examples/custom-components/TableViewCol.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import Checkbox from '@mui/material/Checkbox';
4-
import Typography from '@mui/material/Typography';
5-
import Button from '@mui/material/Button';
6-
import FormControl from '@mui/material/FormControl';
7-
import FormGroup from '@mui/material/FormGroup';
8-
import FormControlLabel from '@mui/material/FormControlLabel';
3+
import { Checkbox, Typography, Button, FormControl, FormGroup, FormControlLabel } from '@mui/material';
94
import { makeStyles } from 'tss-react/mui';
105

116
const useStyles = makeStyles({ name: 'MUIDataTableViewCol' })(theme => ({

examples/custom-components/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import React from "react";
22
import MUIDataTable from "../../src/";
3-
import Chip from '@mui/material/Chip';
4-
import Select from '@mui/material/Select';
5-
import MenuItem from '@mui/material/MenuItem';
3+
import { Chip, Select, MenuItem } from '@mui/material';
64
import TableFilterList from '../../src/components/TableFilterList';
7-
import MuiTooltip from '@mui/material/Tooltip';
8-
import Fade from "@mui/material/Fade";
9-
import Checkbox from '@mui/material/Checkbox';
10-
import Radio from '@mui/material/Radio';
5+
import { Tooltip as MuiTooltip } from '@mui/material';
6+
import { Fade, Checkbox, Radio } from '@mui/material';
117
import TableViewCol from './TableViewCol';
128

139
const CustomChip = (props) => {

examples/customize-footer/CustomFooter.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import React from "react";
2-
import TableFooter from "@mui/material/TableFooter";
3-
import TableRow from "@mui/material/TableRow";
4-
import TableCell from "@mui/material/TableCell";
5-
import MuiTablePagination from "@mui/material/TablePagination";
2+
import { TableFooter, TableRow, TableCell, TablePagination as MuiTablePagination } from "@mui/material";
63
import { withStyles } from "tss-react/mui";
74

85
const defaultFooterStyles = {

0 commit comments

Comments
 (0)