-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Documentation, Added prop validation, improved the way on how t…
…o use classNames, class overirde issue resolved, changes Thumbnail assignment instead of call, added comments
- Loading branch information
Showing
99 changed files
with
696 additions
and
890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import Slider from '@material-ui/lab/Slider'; | ||
import DeleteIcon from '@material-ui/icons/Delete'; | ||
|
||
const styles = { | ||
root: { | ||
width: 300, | ||
}, | ||
}; | ||
|
||
class CustomIconSlider extends React.Component { | ||
state = { | ||
value: 50, | ||
}; | ||
|
||
handleChange = (event, value) => { | ||
this.setState({ value }); | ||
}; | ||
|
||
render() { | ||
const { classes } = this.props; | ||
const { value } = this.state; | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<Typography id="label">Slider Image</Typography> | ||
<Slider | ||
value={value} | ||
aria-labelledby="label" | ||
onChange={this.handleChange} | ||
thumb={<img src="/static/images/cards/live-from-space.jpg" alt="" />} | ||
/> | ||
<Typography id="label">Slider Simple</Typography> | ||
<Slider value={value} aria-labelledby="label" onChange={this.handleChange} /> | ||
<Typography id="label">Slider Icon</Typography> | ||
<Slider | ||
value={value} | ||
aria-labelledby="label" | ||
onChange={this.handleChange} | ||
thumb={<DeleteIcon style={{ color: 'green' }} />} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
CustomIconSlider.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(CustomIconSlider); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.