Skip to content
Snippets Groups Projects
Commit 6236be4d authored by Glenn Vorhes's avatar Glenn Vorhes
Browse files

use default react imports

parent 9f117faa
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,12 @@ declare type iSlider = {
value?: number;
};
export declare class Slider extends React.Component<iSlider, {}> {
static defaultProps: {
steps: any;
animate: any;
defaultAnimationInterval: any;
value: any;
};
private uid;
private startUid;
private stopUid;
......
......@@ -145,5 +145,11 @@ class Slider extends React.Component {
intervalSelect));
}
}
Slider.defaultProps = {
steps: null,
animate: null,
defaultAnimationInterval: null,
value: null
};
exports.Slider = Slider;
//# sourceMappingURL=Slider.js.map
\ No newline at end of file
This diff is collapsed.
......@@ -8,7 +8,7 @@ import makeGuid from '../util/makeGuid';
import {ChangeEvent} from "react";
import {get_browser} from '../util/get_browser';
type iSlider = {
type iSlider = {
change: (d: number) => any;
steps?: number;
animate?: boolean;
......@@ -17,6 +17,14 @@ type iSlider = {
}
export class Slider extends React.Component<iSlider, {}> {
static defaultProps = {
steps: null,
animate: null,
defaultAnimationInterval: null,
value: null
};
private uid: string;
private startUid: string;
private stopUid: string;
......@@ -53,7 +61,7 @@ export class Slider extends React.Component<iSlider, {}> {
this.step = parseFloat(this.el.step);
this.startButton = document.getElementById(this.startUid) as HTMLButtonElement;
this.stopButton = document.getElementById(this.stopUid) as HTMLButtonElement;
if (this.props.animate){
if (this.props.animate) {
this.stopButton.style.display = 'none';
}
this.previousButton = document.getElementById(this.previousUid) as HTMLButtonElement;
......@@ -147,7 +155,7 @@ export class Slider extends React.Component<iSlider, {}> {
let interval = "200";
if (this.props.defaultAnimationInterval){
if (this.props.defaultAnimationInterval) {
interval = this.props.defaultAnimationInterval.toFixed();
}
......@@ -196,4 +204,5 @@ export class Slider extends React.Component<iSlider, {}> {
</div>
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment