Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][docs] Remove react-swipeable-views from demos as it's no longer maintained #41912

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import HorizontalLinearStepper from '../../../../../../docs/data/material/compon
import HorizontalNonLinearStepper from '../../../../../../docs/data/material/components/steppers/HorizontalNonLinearStepper';
import HorizontalStepperWithError from '../../../../../../docs/data/material/components/steppers/HorizontalStepperWithError';
import ProgressMobileStepper from '../../../../../../docs/data/material/components/steppers/ProgressMobileStepper';
import SwipeableTextMobileStepper from '../../../../../../docs/data/material/components/steppers/SwipeableTextMobileStepper';
import TextMobileStepper from '../../../../../../docs/data/material/components/steppers/TextMobileStepper';
import VerticalLinearStepper from '../../../../../../docs/data/material/components/steppers/VerticalLinearStepper';

Expand Down Expand Up @@ -56,12 +55,6 @@ export default function Steppers() {
<ProgressMobileStepper />
</div>
</section>
<section>
<h2> Swipeable Text Mobile Stepper</h2>
<div className="demo-container">
<SwipeableTextMobileStepper />
</div>
</section>
<section>
<h2> Text Mobile Stepper</h2>
<div className="demo-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import HorizontalLinearStepper from '../../../../../docs/data/material/component
import HorizontalNonLinearStepper from '../../../../../docs/data/material/components/steppers/HorizontalNonLinearStepper.tsx';
import HorizontalStepperWithError from '../../../../../docs/data/material/components/steppers/HorizontalStepperWithError.tsx';
import ProgressMobileStepper from '../../../../../docs/data/material/components/steppers/ProgressMobileStepper.tsx';
import SwipeableTextMobileStepper from '../../../../../docs/data/material/components/steppers/SwipeableTextMobileStepper.tsx';
import TextMobileStepper from '../../../../../docs/data/material/components/steppers/TextMobileStepper.tsx';
import VerticalLinearStepper from '../../../../../docs/data/material/components/steppers/VerticalLinearStepper.tsx';

Expand Down Expand Up @@ -57,12 +56,6 @@ export default function Steppers() {
<ProgressMobileStepper />
</div>
</section>
<section>
<h2> Swipeable Text Mobile Stepper</h2>
<div className="demo-container">
<SwipeableTextMobileStepper />
</div>
</section>
<section>
<h2> Text Mobile Stepper</h2>
<div className="demo-container">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import SwipeableViews from 'react-swipeable-views';
import { useTheme } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Tabs from '@mui/material/Tabs';
Expand Down Expand Up @@ -66,10 +65,6 @@ export default function FloatingActionButtonZoom() {
setValue(newValue);
};

const handleChangeIndex = (index) => {
setValue(index);
};

const transitionDuration = {
enter: theme.transitions.duration.enteringScreen,
exit: theme.transitions.duration.leavingScreen,
Expand Down Expand Up @@ -119,21 +114,15 @@ export default function FloatingActionButtonZoom() {
<Tab label="Item Three" {...a11yProps(2)} />
</Tabs>
</AppBar>
<SwipeableViews
axis={theme.direction === 'rtl' ? 'x-reverse' : 'x'}
index={value}
onChangeIndex={handleChangeIndex}
>
<TabPanel value={value} index={0} dir={theme.direction}>
Item One
</TabPanel>
<TabPanel value={value} index={1} dir={theme.direction}>
Item Two
</TabPanel>
<TabPanel value={value} index={2} dir={theme.direction}>
Item Three
</TabPanel>
</SwipeableViews>
<TabPanel value={value} index={0} dir={theme.direction}>
Item One
</TabPanel>
<TabPanel value={value} index={1} dir={theme.direction}>
Item Two
</TabPanel>
<TabPanel value={value} index={2} dir={theme.direction}>
Item Three
</TabPanel>
{fabs.map((fab, index) => (
<Zoom
key={fab.color}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import SwipeableViews from 'react-swipeable-views';
import { useTheme } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Tabs from '@mui/material/Tabs';
Expand Down Expand Up @@ -67,10 +66,6 @@ export default function FloatingActionButtonZoom() {
setValue(newValue);
};

const handleChangeIndex = (index: number) => {
setValue(index);
};

const transitionDuration = {
enter: theme.transitions.duration.enteringScreen,
exit: theme.transitions.duration.leavingScreen,
Expand Down Expand Up @@ -120,21 +115,15 @@ export default function FloatingActionButtonZoom() {
<Tab label="Item Three" {...a11yProps(2)} />
</Tabs>
</AppBar>
<SwipeableViews
axis={theme.direction === 'rtl' ? 'x-reverse' : 'x'}
index={value}
onChangeIndex={handleChangeIndex}
>
<TabPanel value={value} index={0} dir={theme.direction}>
Item One
</TabPanel>
<TabPanel value={value} index={1} dir={theme.direction}>
Item Two
</TabPanel>
<TabPanel value={value} index={2} dir={theme.direction}>
Item Three
</TabPanel>
</SwipeableViews>
<TabPanel value={value} index={0} dir={theme.direction}>
Item One
</TabPanel>
<TabPanel value={value} index={1} dir={theme.direction}>
Item Two
</TabPanel>
<TabPanel value={value} index={2} dir={theme.direction}>
Item Three
</TabPanel>
{fabs.map((fab, index) => (
<Zoom
key={fab.color}
Expand Down
128 changes: 0 additions & 128 deletions docs/data/material/components/steppers/SwipeableTextMobileStepper.js

This file was deleted.

128 changes: 0 additions & 128 deletions docs/data/material/components/steppers/SwipeableTextMobileStepper.tsx

This file was deleted.