aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/timed_progress_bar.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-01 07:49:41 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-01 07:49:41 +0800
commit096f9deceedabff7fe90a7781271f55dfa059e1f (patch)
tree6d5d82e9d576049748c01ffac9e04f6cecafd346 /packages/instant/src/components/timed_progress_bar.tsx
parentae84dac46382258e9a59b194f8aed7184d283e6f (diff)
downloaddexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar.gz
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar.bz2
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar.lz
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar.xz
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.tar.zst
dexon-sol-tools-096f9deceedabff7fe90a7781271f55dfa059e1f.zip
Removing old simulated progress bar, and adding documentation to TimedProgressBar
Diffstat (limited to 'packages/instant/src/components/timed_progress_bar.tsx')
-rw-r--r--packages/instant/src/components/timed_progress_bar.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/instant/src/components/timed_progress_bar.tsx b/packages/instant/src/components/timed_progress_bar.tsx
index 7fdfe1a25..a4bb2eabd 100644
--- a/packages/instant/src/components/timed_progress_bar.tsx
+++ b/packages/instant/src/components/timed_progress_bar.tsx
@@ -1,14 +1,10 @@
import * as _ from 'lodash';
import * as React from 'react';
-import { Keyframes } from 'styled-components';
import { PROGRESS_FINISH_ANIMATION_TIME_MS, PROGRESS_STALL_AT_PERCENTAGE } from '../constants';
import { ColorOption, keyframes, styled } from '../style/theme';
-import { timeUtil } from '../util/time';
import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
export interface TimedProgressBarProps {
expectedTimeMs: number;
@@ -29,6 +25,11 @@ export const beginningState = (props: TimedProgressBarProps): TimedProgressBarSt
};
};
+/**
+ * Timed Progress Bar
+ * Goes from 0% -> PROGRESS_STALL_AT_PERCENTAGE% over time of expectedTimeMs
+ * When ended set to true, goes to 100% through animation of PROGRESS_FINISH_ANIMATION_TIME_MS length
+ */
export class TimedProgressBar extends React.Component<TimedProgressBarProps, TimedProgressBarState> {
private readonly _barRef = React.createRef<HTMLDivElement>();