Sha256: bfe8b1343c9f5670f8e4c07e0ff62a506a44f43f82ab88cc0fc7df38fbeb49f9
Contents?: true
Size: 1.18 KB
Versions: 17
Compression:
Stored size: 1.18 KB
Contents
/* @flow */ import React from 'react' import classnames from 'classnames' import { buildCss } from '../utilities/props' type ProgressSimpleProps = { align?: "left" | "center" | "right", className?: String | Array<String>, dark?: Boolean, data?: String, id?: String, max?: String, muted: Boolean, percent: String, value: Number, width: String } const ProgressSimple = ({ align, className, dark = false, max, muted = false, percent = '', value, width = '100%', }: ProgressSimpleProps) => { const styles = { width: width, } const valueStyles = { width: percent ? `${percent}%` : `${(value * 100) / max}%`, } const wrapperClass = classnames( className, buildCss('pb_progress_simple_wrapper', align, { dark: dark }) ) const kitClass = classnames( className, buildCss('pb_progress_simple_kit', align, { muted: muted }) ) return ( <div className={wrapperClass}> <div className={kitClass} data-value={value} style={styles} > <div className="progress_simple_value" style={valueStyles} /> </div> </div> ) } export default ProgressSimple
Version data entries
17 entries across 17 versions & 1 rubygems