Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import { Accordion, AccordionSummary, AccordionDetails, Typography, Slider } from '@material-ui/core';
- const MyAccordion = () => {
- const [sliderValue, setSliderValue] = React.useState(50);
- const handleSliderChange = (event, newValue) => {
- setSliderValue(newValue);
- };
- return (
- <Accordion>
- <AccordionSummary>
- <Typography>Accordion Heading</Typography>
- </AccordionSummary>
- <AccordionDetails>
- <div>
- <Typography>Slider Value: {sliderValue}</Typography>
- <Slider value={sliderValue} onChange={handleSliderChange} min={0} max={100} />
- </div>
- </AccordionDetails>
- </Accordion>
- );
- };
- export default MyAccordion;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement