MCPcopy Index your code
hub / github.com/react-bootstrap/react-bootstrap / renderProgressBar

Function renderProgressBar

src/ProgressBar.tsx:131–170  ·  view source on GitHub ↗
(
  {
    min,
    now,
    max,
    label,
    visuallyHidden,
    striped,
    animated,
    className,
    style,
    variant,
    bsPrefix,
    ...props
  }: ProgressBarProps,
  ref,
)

Source from the content-addressed store, hash-verified

129}
130
131function renderProgressBar(
132 {
133 min,
134 now,
135 max,
136 label,
137 visuallyHidden,
138 striped,
139 animated,
140 className,
141 style,
142 variant,
143 bsPrefix,
144 ...props
145 }: ProgressBarProps,
146 ref,
147) {
148 return (
149 <div
150 ref={ref}
151 {...props}
152 role="progressbar"
153 className={classNames(className, `${bsPrefix}-bar`, {
154 [`bg-${variant}`]: variant,
155 [`${bsPrefix}-bar-animated`]: animated,
156 [`${bsPrefix}-bar-striped`]: animated || striped,
157 })}
158 style={{ width: `${getPercentage(now, min, max)}%`, ...style }}
159 aria-valuenow={now}
160 aria-valuemin={min}
161 aria-valuemax={max}
162 >
163 {visuallyHidden ? (
164 <span className="visually-hidden">{label}</span>
165 ) : (
166 label
167 )}
168 </div>
169 );
170}
171
172renderProgressBar.propTypes = propTypes;
173

Callers 1

ProgressBar.tsxFile · 0.85

Calls 1

getPercentageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…