blob: b89c56ed558766946bd1b070a4f4a21aecb0b9b5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import * as React from 'react';
import { ColorOption } from '../style/theme';
import { Container } from './ui/container';
import { Text } from './ui/text';
export interface ProgressBarProps {
percentageDone: number;
}
export const ProgressBar: React.StatelessComponent<ProgressBarProps> = props => (
<Container width="100%" backgroundColor={ColorOption.white}>
<Container width={`${props.percentageDone}%`} backgroundColor={ColorOption.black}>
<Text fontColor={ColorOption.white}>{props.percentageDone}%</Text>
</Container>
</Container>
);
|