-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): remove componentWillMount methods for React 17
- Loading branch information
Showing
17 changed files
with
128 additions
and
91 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
import React from 'react'; | ||
import { Slider } from '@momentum-ui/react'; | ||
export default class DefaultSlider extends React.Component { | ||
state = { | ||
value: 200 | ||
} | ||
|
||
handleChange = value => this.setState({ value }) | ||
|
||
render() { | ||
return ( | ||
<Slider | ||
min={0} | ||
max={500} | ||
tick={100} | ||
value={200} | ||
step={1} | ||
/> | ||
<div> | ||
<h5>Value: {this.state.value}</h5> | ||
<Slider | ||
min={0} | ||
max={500} | ||
tick={100} | ||
value={200} | ||
step={1} | ||
onChange={this.handleChange} | ||
/> | ||
</div> | ||
); | ||
} | ||
} |
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,34 @@ | ||
import React from 'react'; | ||
import { | ||
SliderCross, | ||
SliderDefault, | ||
SliderTwoHandles, | ||
SliderStep | ||
} from './index'; | ||
import { Slider } from '@momentum-ui/react'; | ||
export default class SliderKitchenSink extends React.Component { | ||
render() { | ||
return ( | ||
<div className='medium-6 columns'> | ||
<div> | ||
<Slider | ||
min={0} | ||
max={100} | ||
value={{ | ||
low: 20, | ||
high: 40 | ||
}} | ||
/> | ||
</div> | ||
<br/> | ||
<SliderCross /> | ||
<br/> | ||
<SliderDefault /> | ||
<br/> | ||
<SliderTwoHandles /> | ||
<br/> | ||
<SliderStep /> | ||
</div> | ||
); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { default as SliderCross } from './Cross'; | ||
export { default as SliderDefault } from './Default'; | ||
export { default as SliderKitchenSink } from './KitchenSink'; | ||
export { default as SliderStep } from './Step'; | ||
export { default as SliderTwoHandles } from './TwoHandles'; |
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.